diff --git a/codex-ui/src/vue/components/confirm/useConfirm.ts b/codex-ui/src/vue/components/confirm/useConfirm.ts index ef1dd81f..cc0fe0bb 100644 --- a/codex-ui/src/vue/components/confirm/useConfirm.ts +++ b/codex-ui/src/vue/components/confirm/useConfirm.ts @@ -46,16 +46,12 @@ export const useConfirm = createSharedComposable(() => { }); /** - * Check every 100 ms to see if the user has pressed the button + * Check if the user has pressed the confirm or close button */ return new Promise((resolve) => { - const interval = setInterval(() => { - if (result.value !== undefined) { - clearInterval(interval); - resolve(result.value); - } - // eslint-disable-next-line @typescript-eslint/no-magic-numbers - }, 100); + if (result.value !== undefined) { + resolve(result.value); + } }); };