From ed5165ae75e9aff982b285aa3ad46d007640d39d Mon Sep 17 00:00:00 2001 From: Piotr Machowski <6118709+PiotrMachowski@users.noreply.github.com> Date: Thu, 12 Aug 2021 05:39:45 +0200 Subject: [PATCH] Fix deleting property from configuration (#43) Fixes #37 --- src/editor.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/editor.ts b/src/editor.ts index 639ffd2..a1bfc0b 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -275,7 +275,9 @@ export class BoilerplateCardEditor extends LitElement implements LovelaceCardEdi } if (target.configValue) { if (target.value === '') { - delete this._config[target.configValue]; + const tmpConfig = {...this._config}; + delete tmpConfig[target.configValue]; + this._config = tmpConfig; } else { this._config = { ...this._config,