mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Remove undefined key in lovelace card config (#14081)
This commit is contained in:
parent
fe9967550b
commit
19887fbd54
@ -271,6 +271,11 @@ export abstract class HuiElementEditor<T> extends LitElement {
|
|||||||
private _handleUIConfigChanged(ev: UIConfigChangedEvent) {
|
private _handleUIConfigChanged(ev: UIConfigChangedEvent) {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
const config = ev.detail.config;
|
const config = ev.detail.config;
|
||||||
|
Object.keys(config).forEach((key) => {
|
||||||
|
if (config[key] === undefined) {
|
||||||
|
delete config[key];
|
||||||
|
}
|
||||||
|
});
|
||||||
this.value = config as unknown as T;
|
this.value = config as unknown as T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user