mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-24 01:28:35 +02:00
Fix prompt default value
This commit is contained in:
@@ -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 ?? '';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user