Skip to content

Commit

Permalink
fix early exit
Browse files Browse the repository at this point in the history
  • Loading branch information
SBoudrias committed Sep 1, 2024
1 parent bf6efa9 commit 44e6b68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/lib/create-prompt.mts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function createPrompt<Value, Config>(view: ViewFunction<Value, Config>) {
const abort = () => fail(new AbortPromptError({ cause: signal.reason }));
if (signal.aborted) {
abort();
return;
return promise;
}
signal.addEventListener('abort', abort);
cleanups.add(() => signal.removeEventListener('abort', abort));
Expand Down

0 comments on commit 44e6b68

Please sign in to comment.