Browse Source

fix: add comment on currentLang of localization service

pull/11450/head
bnymncoskuner 4 years ago
parent
commit
80fb1ab01d
  1. 5
      npm/ng-packs/packages/core/src/lib/services/localization.service.ts

5
npm/ng-packs/packages/core/src/lib/services/localization.service.ts

@ -25,9 +25,12 @@ export class LocalizationService {
/**
* Returns currently selected language
* Even though this looks like it's redundant to return the same value as `getLanguage()`,
* it's actually not. This could be invoked any time, and the latestLang could be different from the
* sessionState.getLanguage() value.
*/
get currentLang(): string {
return this.latestLang;
return this.latestLang || this.sessionState.getLanguage();
}
get currentLang$(): Observable<string> {

Loading…
Cancel
Save