Skip to content

Commit a834622

Browse files
committed
Prevent duplicate focus and resolution calls when quick pick is already resolved
1 parent cddc397 commit a834622

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎apps/editor/src/views/panel/backend/message-handlers/handle-send-to-browser.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,10 @@ async function show_preset_quick_pick(params: {
550550
quick_pick.onDidHide(() => {
551551
disposables.forEach((d) => d.dispose())
552552
quick_pick.dispose()
553-
panel_provider.send_message({ command: 'FOCUS_PROMPT_FIELD' })
554-
do_resolve(null)
553+
if (!resolved) {
554+
panel_provider.send_message({ command: 'FOCUS_PROMPT_FIELD' })
555+
do_resolve(null)
556+
}
555557
})
556558

557559
disposables.push(quick_pick)

0 commit comments

Comments
 (0)