Skip to content

Commit

Permalink
fix: fix Property 'defaultLang' is used before its initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
damingerdai committed Dec 23, 2020
1 parent 36c8e5b commit 9a7687b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion projects/ngx-translate/core/src/lib/translate.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class TranslateStore {
/**
* The lang currently used
*/
public currentLang: string = this.defaultLang;
public currentLang: string;

/**
* a list of translations per lang
Expand Down Expand Up @@ -45,4 +45,8 @@ export class TranslateStore {
* });
*/
public onDefaultLangChange: EventEmitter<DefaultLangChangeEvent> = new EventEmitter<DefaultLangChangeEvent>();

constructor() {
this.currentLang = this.currentLang;
}
}

0 comments on commit 9a7687b

Please sign in to comment.