Skip to content

Commit

Permalink
Fix a crash in energy csv export (#22476)
Browse files Browse the repository at this point in the history
  • Loading branch information
karwosts authored Oct 22, 2024
1 parent 54320c3 commit 7734922
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/panels/energy/ha-panel-energy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,7 @@ class PanelEnergy extends LitElement {
row.push(type);
row.push(unit.normalize("NFKD"));
times.forEach((t) => {
if (stats[stat][n].start > t) {
row.push("");
} else if (n < stats[stat].length && stats[stat][n].start === t) {
if (n < stats[stat].length && stats[stat][n].start === t) {
row.push((stats[stat][n].change ?? "").toString());
n++;
} else {
Expand Down

0 comments on commit 7734922

Please sign in to comment.