fix error with navigator.vibrate crashing safari
This commit is contained in:
parent
be7be4ef43
commit
65cd13c5ff
|
@ -1,7 +1,6 @@
|
||||||
# LingDocs Pashto Grammar
|
# LingDocs Pashto Grammar
|
||||||
|
|
||||||
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
|
[![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)
|
[![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)
|
![build](https://github.com/lingdocs/grammar.lingdocs.com/actions/workflows/main.yml/badge.svg)
|
||||||
|
|
||||||
|
|
|
@ -214,8 +214,10 @@ function GameCore<Question>({ inChapter, getQuestion, amount, Display, DisplayCo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function punish() {
|
function punish() {
|
||||||
|
if (navigator.vibrate) {
|
||||||
navigator.vibrate(errorVibration);
|
navigator.vibrate(errorVibration);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function handleResult(done: boolean) {
|
function handleResult(done: boolean) {
|
||||||
const result: AT.TestResult = {
|
const result: AT.TestResult = {
|
||||||
done,
|
done,
|
||||||
|
|
Loading…
Reference in New Issue