mirror of
https://github.com/bitwarden/browser
synced 2024-12-27 02:14:24 +01:00
try catch collator set
This commit is contained in:
parent
94ca579168
commit
759ac04ee9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user