From 0995cd3a32ec734bad00d365d98fdf0de98d7e78 Mon Sep 17 00:00:00 2001 From: karwosts Date: Tue, 16 Jul 2024 06:35:13 -0700 Subject: [PATCH] Fix quirks in URL field in view editor --- src/panels/lovelace/editor/view-editor/hui-view-editor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts index f38b6c6e6e9d..ff0c8465b389 100644 --- a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts +++ b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts @@ -146,11 +146,11 @@ export class HuiViewEditor extends LitElement { if ( this.isNew && !this._suggestedPath && - config.title && + this._config.path === config.path && (!this._config.path || config.path === slugify(this._config.title || "", "-")) ) { - config.path = slugify(config.title, "-"); + config.path = slugify(config.title || "", "-"); } fireEvent(this, "view-config-changed", { config });