From 39bbef376f4f800bfea2c99869f4e9054af50477 Mon Sep 17 00:00:00 2001 From: valadaptive Date: Sat, 2 Dec 2023 11:11:29 -0500 Subject: [PATCH] Enable no-undef lint I'm not sure where run_edit is supposed to go or if any logic is missing. I just made my best guess. --- .eslintrc.js | 1 - public/script.js | 1 + public/scripts/extensions/tts/system.js | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 1da6a6754..d81b11b58 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -54,7 +54,6 @@ module.exports = { 'no-control-regex': 'off', 'no-async-promise-executor': 'off', 'no-inner-declarations': 'off', - 'no-undef': 'off', 'require-yield': 'off', 'no-constant-condition': ['error', {checkLoops: false}] } diff --git a/public/script.js b/public/script.js index 11f298155..68296aea5 100644 --- a/public/script.js +++ b/public/script.js @@ -8569,6 +8569,7 @@ jQuery(async function () { if (this_edit_mes_id !== undefined) { let mes_edited = $(`#chat [mesid="${this_edit_mes_id}"]`).find(".mes_edit_done"); if (Number(edit_mes_id) == count_view_mes - 1) { //if the generating swipe (...) + let run_edit = true; if (chat[edit_mes_id]['swipe_id'] !== undefined) { if (chat[edit_mes_id]['swipes'].length === chat[edit_mes_id]['swipe_id']) { run_edit = false; diff --git a/public/scripts/extensions/tts/system.js b/public/scripts/extensions/tts/system.js index 9c1af3b7e..9346a0f06 100644 --- a/public/scripts/extensions/tts/system.js +++ b/public/scripts/extensions/tts/system.js @@ -191,7 +191,7 @@ class SystemTtsProvider { const voice = speechSynthesis.getVoices().find(x => x.voiceURI === voiceId); if (!voice) { - throw `TTS Voice name ${voiceName} not found` + throw `TTS Voice id ${voiceId} not found` } speechSynthesis.cancel();