Skip to content

Commit 9a7687b

Browse files
committed
fix: fix Property 'defaultLang' is used before its initialization.
1 parent 36c8e5b commit 9a7687b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

projects/ngx-translate/core/src/lib/translate.store.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class TranslateStore {
1010
/**
1111
* The lang currently used
1212
*/
13-
public currentLang: string = this.defaultLang;
13+
public currentLang: string;
1414

1515
/**
1616
* a list of translations per lang
@@ -45,4 +45,8 @@ export class TranslateStore {
4545
* });
4646
*/
4747
public onDefaultLangChange: EventEmitter<DefaultLangChangeEvent> = new EventEmitter<DefaultLangChangeEvent>();
48+
49+
constructor() {
50+
this.currentLang = this.currentLang;
51+
}
4852
}

0 commit comments

Comments
 (0)