1
0
mirror of https://github.com/bitwarden/browser synced 2024-12-27 18:34:29 +01:00

try catch collator set

This commit is contained in:
Kyle Spearrin 2018-04-14 20:26:04 -04:00
parent 94ca579168
commit 759ac04ee9

View File

@ -26,7 +26,12 @@ export class I18nService implements I18nServiceAbstraction {
this.inited = true;
this.locale = this.translationLocale = locale != null ? locale : this.systemLanguage;
try {
this.collator = new Intl.Collator(this.locale);
} catch {
this.collator = null;
}
if (this.supportedTranslationLocales.indexOf(this.translationLocale) === -1) {
this.translationLocale = this.translationLocale.slice(0, 2);