Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
godind committed Mar 24, 2024
1 parent 301b1c9 commit b806bad
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ export class WidgetFreeboardskComponent extends BaseWidgetComponent implements O
ngOnInit(): void {
let loginToken: string = null;
this.authTokenSubscription = this.auth.authToken$.subscribe(AuthServiceToken => {
loginToken = AuthServiceToken.token;
});
loginToken = AuthServiceToken?.token;
}
);

this.widgetUrl = `${this.appSettings.signalkUrl.url}/@signalk/freeboard-sk/?token=${loginToken}`;
this.widgetUrl = loginToken ? `${this.appSettings.signalkUrl.url}/@signalk/freeboard-sk/?token=${loginToken}` : `${this.appSettings.signalkUrl.url}/@signalk/freeboard-sk/`;
}

ngOnDestroy(): void {
Expand Down

0 comments on commit b806bad

Please sign in to comment.