Skip to content

Commit

Permalink
fixed wrong TTS if translation.text === ""
Browse files Browse the repository at this point in the history
  • Loading branch information
klues committed Feb 5, 2021
1 parent 83f7c3c commit 506d597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/service/speechService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 506d597

Please sign in to comment.