mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 06:23:37 -05:00
Log error instead of returning null
This commit is contained in:
parent
a968dadb7a
commit
bed0b05bc9
1 changed files with 2 additions and 2 deletions
|
@ -512,7 +512,7 @@ class Scratch3Text2SpeechBlocks {
|
|||
/**
|
||||
* Get the extension locale for a supported locale, or null.
|
||||
* @param {string} locale a locale code.
|
||||
* @returns {?string} a locale supported by the extension, or null.
|
||||
* @returns {?string} a locale supported by the extension.
|
||||
*/
|
||||
_getExtensionLocaleForSupportedLocale (locale) {
|
||||
for (const lang in this.LANGUAGE_INFO) {
|
||||
|
@ -520,7 +520,7 @@ class Scratch3Text2SpeechBlocks {
|
|||
return lang;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
log.error(`cannot find extension locale for locale ${locale}`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue