Default to empty string for UI language detection

When removing all “Languages” from Firefox, the UI breaks and you see an error in the console that says “langInfo is undefined”. This fixes that.
This commit is contained in:
Shane McDonald 2017-02-14 16:54:32 -05:00
parent be686e0acc
commit 065bd6041c

View File

@ -21,7 +21,8 @@ export default
return function() {
var langInfo = ($window.navigator.languages || [])[0] ||
$window.navigator.language ||
$window.navigator.userLanguage;
$window.navigator.userLanguage ||
'';
var langUrl = langInfo.replace('-', '_');
//gettextCatalog.debug = true;
gettextCatalog.setCurrentLanguage(langInfo);