Skip to content

Commit

Permalink
prevent unnecesary code execution outside of alarmo dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsfaber committed Apr 20, 2023
1 parent c1a1624 commit 431d9dc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/alarmo/frontend/src/alarm-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class MyAlarmPanel extends LitElement {

async firstUpdated() {
window.addEventListener('location-changed', () => {
if(!window.location.pathname.includes('alarmo')) return;
this.requestUpdate();
});

Expand Down

0 comments on commit 431d9dc

Please sign in to comment.