mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-11 20:00:29 +01:00
Fix prompt default value
This commit is contained in:
@@ -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