From 9aaaaae1756a5d7efafe5768f5a14038ca714fde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Wed, 24 Mar 2021 09:49:28 +0100 Subject: [PATCH] Fix race condition in map card (#8697) --- src/panels/lovelace/cards/hui-map-card.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/lovelace/cards/hui-map-card.ts b/src/panels/lovelace/cards/hui-map-card.ts index 894e896271..bc54ec2a52 100644 --- a/src/panels/lovelace/cards/hui-map-card.ts +++ b/src/panels/lovelace/cards/hui-map-card.ts @@ -284,7 +284,7 @@ class HuiMapCard extends LitElement implements LovelaceCard { this.updateMap(changedProps.get("_config") as MapCardConfig); } - if (this._config!.hours_to_show && this._configEntities?.length) { + if (this._config?.hours_to_show && this._configEntities?.length) { const minute = 60000; if (changedProps.has("_config")) { this._getHistory();