Skip to content

Commit

Permalink
Support entry language not change on switching language
Browse files Browse the repository at this point in the history
Issue caused by caching the initially selected language and not changing
current language while switching language. Resolved by resetting
lazyloaded when switching the system language.

close: 7335
  • Loading branch information
BijinDev authored and hrb-hub committed Nov 18, 2024
1 parent 3ef5432 commit a43c0ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common/support/FaqModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export class FaqModel {
}

async init(websiteBaseUrl: string): Promise<void> {
//resetting the lazy reload whenever the language preference change to clear caching.
if (this.currentLanguageCode !== lang.code) {
this.lazyLoaded.reset()
}
this.websiteBaseUrl = websiteBaseUrl
await this.lazyLoaded.getAsync()
this.getList()
Expand Down

0 comments on commit a43c0ba

Please sign in to comment.