Skip to content

Commit

Permalink
Fix conditional card
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya committed May 22, 2024
1 parent 9049a64 commit 103a92c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/panels/lovelace/cards/hui-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ export class HuiCard extends ReactiveElement {
return;
}
this._config = config;
this._element = createCardElement(config) as LovelaceCard;

this._element!.hass = this.hass;
this._element!.editMode = this.lovelace.editMode;
this._element = createCardElement(config);
this._element.hass = this.hass;
this._element.editMode = this.lovelace.editMode;

while (this.lastChild) {
this.removeChild(this.lastChild);
Expand Down
3 changes: 2 additions & 1 deletion src/panels/lovelace/components/hui-conditional-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ export class HuiConditionalBase extends ReactiveElement {
if (
changed.has("_element") ||
changed.has("_config") ||
changed.has("hass")
changed.has("hass") ||
changed.has("editMode")
) {
this._listenMediaQueries();
this._updateVisibility();
Expand Down

0 comments on commit 103a92c

Please sign in to comment.