Fix prompt default value

This commit is contained in:
Gregory Schier
2025-11-19 10:10:13 -08:00
parent 17b6c945e6
commit 0e98a3e498

View File

@@ -37,5 +37,7 @@ export async function showPrompt({
confirmText, 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 ?? '';
} }