1
mirror of https://github.com/home-assistant/frontend synced 2024-09-22 18:30:59 +02:00

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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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,