From 7ce0b34774b2fb0ad725bb6f4ea1e279ad6fba62 Mon Sep 17 00:00:00 2001 From: Zack Arnett Date: Thu, 14 May 2020 12:37:38 -0400 Subject: [PATCH] Resizer fix (#5882) --- src/panels/lovelace/cards/hui-weather-forecast-card.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/panels/lovelace/cards/hui-weather-forecast-card.ts b/src/panels/lovelace/cards/hui-weather-forecast-card.ts index 211d608332..74f0151a2e 100644 --- a/src/panels/lovelace/cards/hui-weather-forecast-card.ts +++ b/src/panels/lovelace/cards/hui-weather-forecast-card.ts @@ -303,6 +303,10 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard { } private _measureCard() { + if (!this.isConnected) { + return; + } + this._narrow = this.offsetWidth < 375; if (this.offsetWidth < 300) { this.setAttribute("verynarrow", "");