Avoid error in map-card

This commit is contained in:
Thomas Lovén 2021-05-20 16:18:31 +02:00 committed by GitHub
parent 87e4c209f4
commit 813c9014e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -297,7 +297,7 @@ class HuiMapCard extends LitElement implements LovelaceCard {
private async loadMap(): Promise<void> {
[this._leafletMap, this.Leaflet, this._tileLayer] = await setupLeafletMap(
this._mapEl,
this._config!.dark_mode ?? this.hass.themes.darkMode
this._config?.dark_mode ?? this.hass.themes.darkMode
);
this._drawEntities();
this._leafletMap.invalidateSize();