Skip to content

Commit 6dad8c4

Browse files
committed
fix: ensure fallback value is used when no selection is made in createSelect
1 parent 304460c commit 6dad8c4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/createSelect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function createSelect<T extends boolean = false>(
5555
if (quickPickOptions?.canSelectMany)
5656
resolve(selection.map(item => item.label) as any)
5757
else
58-
resolve(selection[0]?.label as any)
58+
resolve(selection[0]?.label as any || quickPick.value)
5959
; (quickPickOptions?.onDidAccept || noop)()
6060
quickPick.hide()
6161
})

0 commit comments

Comments
 (0)