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 committed Jan 20, 2021
1 parent 38eddd0 commit d566b1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
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 d566b1b

Please sign in to comment.