Skip to content

Commit

Permalink
fix(pwa-helper): _routeChanged
Browse files Browse the repository at this point in the history
Co-authored-by: S. Amir Mohammad Najafi <[email protected]>
  • Loading branch information
alimd and njfamirm committed Feb 3, 2023
1 parent 7212201 commit 5a22e3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/pwa-helper/src/pwa-element.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {AlwatrSmartElement} from '@alwatr/element';
import {localeContextConsumer, setLocale} from '@alwatr/i18n';
import {routerOutlet, type RoutesConfig} from '@alwatr/router';
import {routeContextConsumer, routerOutlet, type RoutesConfig} from '@alwatr/router';
import {html, css, type CSSResultGroup, type PropertyValues} from 'lit';
import {cache} from 'lit/directives/cache.js';

Expand Down Expand Up @@ -43,10 +43,10 @@ export class AlwatrPwaElement extends AlwatrSmartElement {

override connectedCallback(): void {
super.connectedCallback();
this._signalListenerList.push(localeContextConsumer.subscribe(this._routeChanged.bind(this)));
if (localeContextConsumer.getValue() === undefined) {
setLocale('fa');
}
this._signalListenerList.push(routeContextConsumer.subscribe(this._routeChanged.bind(this)));
}

protected _routeChanged(): void {
Expand Down

0 comments on commit 5a22e3f

Please sign in to comment.