Skip to content

Commit

Permalink
fix: should return when signal is aborted
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Apr 22, 2024
1 parent ca53a2a commit 23fc9c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/presets/src/ai/actions/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export function bindEventSource(
}
finish('success');
})().catch(err => {
if (signal?.aborted) return;
if (err.name === 'AbortError') {
finish('aborted');
} else {
Expand Down

0 comments on commit 23fc9c7

Please sign in to comment.