1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-08-26 23:09:46 +02: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;
this.collator = new Intl.Collator(this.locale);
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);