Fix race condition in map card (#8697)

This commit is contained in:
Thomas Lovén 2021-03-24 09:49:28 +01:00 committed by GitHub
parent 7d39b69540
commit 9aaaaae175
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();