mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 01:36:49 +00:00
Don't set hass when not defined (#5967)
This commit is contained in:
parent
df3b70a533
commit
5f81a204f2
@ -76,7 +76,9 @@ class HuiPictureElementsCard extends LitElement implements LovelaceCard {
|
||||
this._elements = this._config.elements.map(
|
||||
(elementConfig: LovelaceElementConfig) => {
|
||||
const element = createStyledHuiElement(elementConfig);
|
||||
element.hass = this.hass;
|
||||
if (this.hass) {
|
||||
element.hass = this.hass;
|
||||
}
|
||||
return element as LovelaceElement;
|
||||
}
|
||||
);
|
||||
|
@ -58,8 +58,12 @@ export abstract class HuiStackCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
|
||||
for (const element of this._cards) {
|
||||
element.hass = this.hass;
|
||||
element.editMode = this.editMode;
|
||||
if (this.hass) {
|
||||
element.hass = this.hass;
|
||||
}
|
||||
if (this.editMode !== undefined) {
|
||||
element.editMode = this.editMode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user