mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 18:56:39 +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")) {
|
if (changedProps.has("hass")) {
|
||||||
const oldHass = changedProps.get("hass") as HomeAssistant | undefined;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (!this._leafletMap || !this._tileLayer) {
|
if (!this._leafletMap || !this._tileLayer) {
|
||||||
@ -117,7 +117,7 @@ class LocationEditor extends LitElement {
|
|||||||
this.Leaflet,
|
this.Leaflet,
|
||||||
this._leafletMap,
|
this._leafletMap,
|
||||||
this._tileLayer,
|
this._tileLayer,
|
||||||
this.hass.themes.darkMode
|
this.hass.themes?.darkMode
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -129,7 +129,7 @@ class LocationEditor extends LitElement {
|
|||||||
private async _initMap(): Promise<void> {
|
private async _initMap(): Promise<void> {
|
||||||
[this._leafletMap, this.Leaflet, this._tileLayer] = await setupLeafletMap(
|
[this._leafletMap, this.Leaflet, this._tileLayer] = await setupLeafletMap(
|
||||||
this._mapEl,
|
this._mapEl,
|
||||||
this.hass.themes.darkMode,
|
this.hass.themes?.darkMode,
|
||||||
Boolean(this.radius)
|
Boolean(this.radius)
|
||||||
);
|
);
|
||||||
this._leafletMap.addEventListener(
|
this._leafletMap.addEventListener(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user