mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +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) {
|
||||
ev.stopPropagation();
|
||||
const config = ev.detail.config;
|
||||
Object.keys(config).forEach((key) => {
|
||||
if (config[key] === undefined) {
|
||||
delete config[key];
|
||||
}
|
||||
});
|
||||
this.value = config as unknown as T;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user