set theme to undefined when no theme (#11765)

This commit is contained in:
Bram Kragten 2022-02-21 22:56:10 +01:00 committed by GitHub
parent eb1f94c370
commit e6d1e86c64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -57,7 +57,7 @@ export class HuiThemeSelectEditor extends LitElement {
if (!this.hass || ev.target.value === "") {
return;
}
this.value = ev.target.value === "remove" ? "" : ev.target.value;
this.value = ev.target.value === "remove" ? undefined : ev.target.value;
fireEvent(this, "value-changed", { value: this.value });
}
}

View File

@ -65,7 +65,6 @@ export class HuiAreaCardEditor
private _valueChanged(ev: CustomEvent): void {
const config = ev.detail.value;
Object.keys(config).forEach((k) => config[k] === "" && delete config[k]);
fireEvent(this, "config-changed", { config });
}