Log error instead of returning null

This commit is contained in:
Eric Rosenbaum committed 2019-03-12 14:29:39 -04:00
1 parent a968dadb7a
commit bed0b05bc9
1 file changed
+2 -2
+2 -2
View File
@@ -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}`);
}
/**