diff --git a/frontend/src/lib/components/Path.svelte b/frontend/src/lib/components/Path.svelte index bad0a8016d..16bf6d027f 100644 --- a/frontend/src/lib/components/Path.svelte +++ b/frontend/src/lib/components/Path.svelte @@ -72,8 +72,8 @@ fullNamePlaceholder = undefined, namePlaceholder = '', initialPath, - path = $bindable(''), - error = $bindable(''), + path = $bindable(undefined), + error = $bindable(undefined), disabled = $bindable(false), checkInitialPathExistence = false, autofocus = true, @@ -83,6 +83,15 @@ disableEditing = false }: Props = $props() + $effect.pre(() => { + if (path == undefined) { + path = '' + } + if (error == undefined) { + error = '' + } + }) + let inputP: HTMLInputElement | undefined = $state(undefined) const dispatch = createEventDispatcher() @@ -165,7 +174,7 @@ meta = newMeta path = metaToPath(meta) } else { - meta = pathToMeta(path, hideUser) + meta = pathToMeta(path ?? '', hideUser) } }