fix error with navigator.vibrate crashing safari
This commit is contained in:
parent
be7be4ef43
commit
65cd13c5ff
|
@ -1,7 +1,6 @@
|
|||
# LingDocs Pashto Grammar
|
||||
|
||||
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
|
||||
|
||||
[![Netlify Status](https://api.netlify.com/api/v1/badges/150beb8b-aae1-4cef-a05c-2add5d8904f7/deploy-status)](https://app.netlify.com/sites/pashto-grammar/deploys)
|
||||
![build](https://github.com/lingdocs/grammar.lingdocs.com/actions/workflows/main.yml/badge.svg)
|
||||
|
||||
|
|
|
@ -214,7 +214,9 @@ function GameCore<Question>({ inChapter, getQuestion, amount, Display, DisplayCo
|
|||
}
|
||||
}
|
||||
function punish() {
|
||||
navigator.vibrate(errorVibration);
|
||||
if (navigator.vibrate) {
|
||||
navigator.vibrate(errorVibration);
|
||||
}
|
||||
}
|
||||
function handleResult(done: boolean) {
|
||||
const result: AT.TestResult = {
|
||||
|
|
Loading…
Reference in New Issue