From 265ca40df1525f97c6819a01cd2865a75da73dd4 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 21 Jan 2023 17:45:29 -1000 Subject: [PATCH] move setInterval --- src/panels/lovelace/header-footer/hui-graph-header-footer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 f2264a3056..12dbbfdcaf 100644 --- a/src/panels/lovelace/header-footer/hui-graph-header-footer.ts +++ b/src/panels/lovelace/header-footer/hui-graph-header-footer.ts @@ -186,10 +186,10 @@ export class HuiGraphHeaderFooter } private _unsubscribeHistoryTimeWindow() { + clearInterval(this._interval); if (!this._subscribed) { return; } - clearInterval(this._interval); this._subscribed.then((unsubscribe) => { if (unsubscribe) { unsubscribe();