Add checks for calling coreLocalizer.tInfo before loading strings

This commit is contained in:
Quincy Morgan
2020-12-02 10:10:20 -05:00
parent 24189c9c20
commit 102fe6277c

View File

@@ -260,7 +260,7 @@ export function coreLocalizer() {
let stringsKey = locale;
// US English is the default
if (stringsKey.toLowerCase() === 'en-us') stringsKey = 'en';
let result = _localeStrings[scopeId][stringsKey];
let result = _localeStrings && _localeStrings[scopeId] && _localeStrings[scopeId][stringsKey];
while (result !== undefined && path.length) {
result = result[path.pop()];