From 506d5971ffbd10687dcb5ba19984778c36e8c6bb Mon Sep 17 00:00:00 2001 From: Benjamin Klaus Date: Fri, 5 Feb 2021 14:43:23 +0100 Subject: [PATCH] fixed wrong TTS if translation.text === "" --- src/js/service/speechService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/service/speechService.js b/src/js/service/speechService.js index 64e79aac4..5ebcf0320 100644 --- a/src/js/service/speechService.js +++ b/src/js/service/speechService.js @@ -42,7 +42,7 @@ speechService.speak = function (textOrOject, lang, preferredVoiceProp) { } else { lang = getVoiceLang(_preferredVoiceName) || lang; let translation = textOrOject[lang] || i18nService.getTranslation(textOrOject, null, true); - text = translation.text ? translation.text : translation; + text = translation.text !== undefined ? translation.text : translation; lang = lang || translation.lang; } speechService.stopSpeaking();