Skip to content

Commit

Permalink
fix: Linking to specific player only work after crtl+F5
Browse files Browse the repository at this point in the history
  • Loading branch information
punxaphil committed Dec 26, 2024
1 parent dea3e1a commit c67c1c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class Card extends LitElement {
@state() showLoader!: boolean;
@state() loaderTimestamp!: number;
@state() cancelLoader!: boolean;
@state() activePlayerId!: string;
@state() activePlayerId?: string;

render() {
this.createStore();
Expand Down Expand Up @@ -121,6 +121,10 @@ export class Card extends LitElement {
}
window.addEventListener(CALL_MEDIA_STARTED, this.callMediaStartedListener);
window.addEventListener(CALL_MEDIA_DONE, this.callMediaDoneListener);
window.addEventListener('hashchange', () => {
this.activePlayerId = undefined;
this.createStore();
});
}

disconnectedCallback() {
Expand Down

0 comments on commit c67c1c7

Please sign in to comment.