mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
Fix conditional and custom panel updated > update (#5891)
This commit is contained in:
parent
b61cf60faf
commit
67e17d4016
@ -43,7 +43,8 @@ export class HaPanelCustom extends UpdatingElement {
|
|||||||
this._cleanupPanel();
|
this._cleanupPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected updated(changedProps: PropertyValues) {
|
protected update(changedProps: PropertyValues) {
|
||||||
|
super.update(changedProps);
|
||||||
if (changedProps.has("panel")) {
|
if (changedProps.has("panel")) {
|
||||||
// Clean up old things if we had a panel
|
// Clean up old things if we had a panel
|
||||||
if (changedProps.get("panel")) {
|
if (changedProps.get("panel")) {
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
import { customElement, property, UpdatingElement } from "lit-element";
|
import {
|
||||||
|
customElement,
|
||||||
|
property,
|
||||||
|
UpdatingElement,
|
||||||
|
PropertyValues,
|
||||||
|
} from "lit-element";
|
||||||
import { HomeAssistant } from "../../../types";
|
import { HomeAssistant } from "../../../types";
|
||||||
import { ConditionalCardConfig } from "../cards/types";
|
import { ConditionalCardConfig } from "../cards/types";
|
||||||
import {
|
import {
|
||||||
@ -40,7 +45,8 @@ export class HuiConditionalBase extends UpdatingElement {
|
|||||||
this._config = config;
|
this._config = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected update(): void {
|
protected update(changed: PropertyValues): void {
|
||||||
|
super.update(changed);
|
||||||
if (!this._element || !this.hass || !this._config) {
|
if (!this._element || !this.hass || !this._config) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user