1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

delay i18n load on edge for constants

This commit is contained in:
Kyle Spearrin
2017-12-04 09:06:32 -05:00
parent 873cb6aba6
commit 61fb18ec4b
4 changed files with 19 additions and 9 deletions

View File

@@ -1,3 +1,5 @@
import UtilsService from './utils.service';
export default class ConstantsService {
static readonly environmentUrlsKey: string = 'environmentUrls';
static readonly disableGaKey: string = 'disableGa';
@@ -55,9 +57,20 @@ export default class ConstantsService {
remember: 5,
};
readonly twoFactorProviderInfo: any[];
twoFactorProviderInfo: any[];
constructor(i18nService: any) {
constructor(i18nService: any, utilsService: UtilsService) {
if (utilsService.isEdge()) {
// delay for i18n fetch
setTimeout(() => {
this.bootstrap(i18nService);
}, 1000);
} else {
this.bootstrap(i18nService);
}
}
private bootstrap(i18nService: any) {
this.twoFactorProviderInfo = [
{
type: 0,