From 4b428a60cd67abdc30f8014f52fcbfee4bf742f7 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Tue, 28 Feb 2023 02:06:51 -0800 Subject: [PATCH] Fix a hang in history graph card editor (#15623) --- src/components/chart/state-history-chart-timeline.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/chart/state-history-chart-timeline.ts b/src/components/chart/state-history-chart-timeline.ts index 546e062d29..fd2dea5e0a 100644 --- a/src/components/chart/state-history-chart-timeline.ts +++ b/src/components/chart/state-history-chart-timeline.ts @@ -143,7 +143,10 @@ export class StateHistoryChartTimeline extends LitElement { } }, afterUpdate: (y) => { - if (this._yWidth !== Math.floor(y.width)) { + if ( + this._yWidth !== Math.floor(y.width) && + y.ticks.length === this.data.length + ) { this._yWidth = Math.floor(y.width); fireEvent(this, "y-width-changed", { value: this._yWidth,