diff --git a/src/panels/lovelace/header-footer/hui-graph-header-footer.ts b/src/panels/lovelace/header-footer/hui-graph-header-footer.ts index 0d0c04422f..b73be70176 100644 --- a/src/panels/lovelace/header-footer/hui-graph-header-footer.ts +++ b/src/panels/lovelace/header-footer/hui-graph-header-footer.ts @@ -75,7 +75,7 @@ export class HuiGraphHeaderFooter extends LitElement `; } - if (this._coordinates.length < 1) { + if (!this._coordinates.length) { return html`
@@ -146,12 +146,13 @@ export class HuiGraphHeaderFooter extends LitElement this._stateHistory!.push(...stateHistory[0]); } - this._coordinates = coordinates( - this._stateHistory, - this._config!.hours_to_show!, - 500, - this._config!.detail! - ); + this._coordinates = + coordinates( + this._stateHistory, + this._config!.hours_to_show!, + 500, + this._config!.detail! + ) || []; this._date = endTime; this._fetching = false;