From 8081293fe41859a4331f203d1610c2c58ed35f14 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Sat, 1 Feb 2025 19:16:29 +1030 Subject: [PATCH] Apply suggestions from code review --- .../RecipePageParts/RecipePageInstructionPlayer.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageInstructionPlayer.vue b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageInstructionPlayer.vue index 253f70cc7..7c18510bd 100644 --- a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageInstructionPlayer.vue +++ b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageInstructionPlayer.vue @@ -55,7 +55,7 @@ export default defineComponent({ }, nextIndex() { // TODO: i18n stopwords in sync with the browser's implementation? Assumes . and ! are boundaries, may not be true for all languages. - const match = this.step.text.slice(this.currentIndex).search(/[\.\!]/) + const match = this.step.text.slice(this.currentIndex).search(/[.!]/) if (match === -1) { return this.currentIndex; } @@ -120,7 +120,7 @@ export default defineComponent({ // console.log(event) // }; utterance.onerror = (event) => { - if (event.error == "interrupted") { + if (event.error === "interrupted") { this.playing = false; this.played = false; this.paused = false;