From 759ac04ee93a447339d40afa57ac513b3c130f9c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 14 Apr 2018 20:26:04 -0400 Subject: [PATCH] try catch collator set --- src/services/i18n.service.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/services/i18n.service.ts b/src/services/i18n.service.ts index 6a6fa69c9a..9b9aaea68f 100644 --- a/src/services/i18n.service.ts +++ b/src/services/i18n.service.ts @@ -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);