mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +00:00
Fix map init on connected (#5505)
This commit is contained in:
parent
35c2d8966b
commit
cd1bfe1b20
@ -79,7 +79,6 @@ class HuiMapCard extends LitElement implements LovelaceCard {
|
|||||||
@property()
|
@property()
|
||||||
private _history?: HassEntity[][];
|
private _history?: HassEntity[][];
|
||||||
private _date?: Date;
|
private _date?: Date;
|
||||||
private _loaded = false;
|
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
private _config?: MapCardConfig;
|
private _config?: MapCardConfig;
|
||||||
@ -283,10 +282,6 @@ class HuiMapCard extends LitElement implements LovelaceCard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async loadMap(): Promise<void> {
|
private async loadMap(): Promise<void> {
|
||||||
if (this._loaded) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this._loaded = true;
|
|
||||||
[this._leafletMap, this.Leaflet] = await setupLeafletMap(
|
[this._leafletMap, this.Leaflet] = await setupLeafletMap(
|
||||||
this._mapEl,
|
this._mapEl,
|
||||||
this._config !== undefined ? this._config.dark_mode === true : false
|
this._config !== undefined ? this._config.dark_mode === true : false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user