Fix cancellation

This commit is contained in:
Daniel O'Connor 2025-02-01 05:53:02 +00:00
commit 6d188b59d2

View file

@ -78,9 +78,7 @@ export default defineComponent({
}, },
play() { play() {
const self = this; const self = this;
if (this.utterance && this.playing) {
speechSynthesis.cancel(); speechSynthesis.cancel();
}
const utterance = new SpeechSynthesisUtterance(this.step.text); const utterance = new SpeechSynthesisUtterance(this.step.text);
utterance.onstart = (event) => { utterance.onstart = (event) => {