Skip to content

Commit

Permalink
fix: Fix undefined variable introduced by #545
Browse files Browse the repository at this point in the history
  • Loading branch information
RomRider authored and jlsjonas committed Jan 22, 2022
1 parent a334b84 commit 9e923f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.js
Expand Up @@ -907,7 +907,7 @@ class MiniGraphCard extends LitElement {

if (stateHistory.length === 0) return;

if (entity.entity_id === this.entity[0].entity_id) {
if (this.entity[0] && entity.entity_id === this.entity[0].entity_id) {
this.updateExtrema(stateHistory);
}

Expand Down

0 comments on commit 9e923f5

Please sign in to comment.