Fix a hang in history graph card editor (#15623)

This commit is contained in:
karwosts
2023-02-28 02:06:51 -08:00
committed by GitHub
parent 9ce4563dd4
commit 4b428a60cd

View File

@@ -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,