diff --git a/src-web/lib/prompt.ts b/src-web/lib/prompt.ts index d80e6e1c..9105005b 100644 --- a/src-web/lib/prompt.ts +++ b/src-web/lib/prompt.ts @@ -37,5 +37,7 @@ export async function showPrompt({ confirmText, }); - return result?.value ? String(result.value) : null; + if (result == null) return null; // Cancelled + if (typeof result.value === 'string') return result.value; + else return props.defaultValue ?? ''; }