Fix quirks in URL field in view editor (#21410)

This commit is contained in:
karwosts 2024-07-19 02:54:35 -07:00 committed by GitHub
parent 6e29b77e94
commit 8cb63ac36d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 });