From 729a5e385f429f9ca8aba34802d47e832e64e82c Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Fri, 24 Jan 2020 15:12:14 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20don't=20remove=20key=20when=20va?= =?UTF-8?q?lue=20is=20empty=20(#4583)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 don't remove key when value is empty * only restrict delete to required field --- .../lovelace/editor/config-elements/hui-markdown-card-editor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/lovelace/editor/config-elements/hui-markdown-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-markdown-card-editor.ts index 22f60e30ce..41a20f070b 100644 --- a/src/panels/lovelace/editor/config-elements/hui-markdown-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-markdown-card-editor.ts @@ -100,7 +100,7 @@ export class HuiMarkdownCardEditor extends LitElement return; } if (target.configValue) { - if (target.value === "") { + if (target.value === "" && target.configValue !== "content") { delete this._config[target.configValue!]; } else { this._config = {