mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-24 21:37:21 +00:00
Fix location editor in onboarding (#6512)
This commit is contained in:
parent
410bd22f8a
commit
6991403203
@ -107,7 +107,7 @@ class LocationEditor extends LitElement {
|
||||
|
||||
if (changedProps.has("hass")) {
|
||||
const oldHass = changedProps.get("hass") as HomeAssistant | undefined;
|
||||
if (!oldHass || oldHass.themes.darkMode === this.hass.themes.darkMode) {
|
||||
if (!oldHass || oldHass.themes?.darkMode === this.hass.themes?.darkMode) {
|
||||
return;
|
||||
}
|
||||
if (!this._leafletMap || !this._tileLayer) {
|
||||
@ -117,7 +117,7 @@ class LocationEditor extends LitElement {
|
||||
this.Leaflet,
|
||||
this._leafletMap,
|
||||
this._tileLayer,
|
||||
this.hass.themes.darkMode
|
||||
this.hass.themes?.darkMode
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -129,7 +129,7 @@ class LocationEditor extends LitElement {
|
||||
private async _initMap(): Promise<void> {
|
||||
[this._leafletMap, this.Leaflet, this._tileLayer] = await setupLeafletMap(
|
||||
this._mapEl,
|
||||
this.hass.themes.darkMode,
|
||||
this.hass.themes?.darkMode,
|
||||
Boolean(this.radius)
|
||||
);
|
||||
this._leafletMap.addEventListener(
|
||||
|
Loading…
x
Reference in New Issue
Block a user