mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-21 11:39:14 -04:00
Fix crash when language is not a string
This commit is contained in:
parent
bb9ac40252
commit
ac10f5878b
1 changed files with 1 additions and 1 deletions
|
@ -523,7 +523,7 @@ class Scratch3Text2SpeechBlocks {
|
|||
// Support language names dropped onto the menu via reporter block
|
||||
// such as a variable containing a language name (in any language),
|
||||
// or the translate extension's language reporter.
|
||||
const localeForDroppedName = languageNames.nameMap[locale.toLowerCase()];
|
||||
const localeForDroppedName = languageNames.nameMap[locale.toString().toLowerCase()];
|
||||
if (localeForDroppedName && this.isSupportedLanguage(localeForDroppedName)) {
|
||||
stage.textToSpeechLanguage =
|
||||
this._getExtensionLocaleForSupportedLocale(localeForDroppedName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue