mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-18 06:28:25 +01:00
Fix prompt default value
This commit is contained in:
1 parent
17b6c945e6
commit
0e98a3e498
1 file changed
+3
-1
@@ -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 ?? '';
|
||||
}
|
||||
Reference in new issue
Block a user