Skip to content

Commit

Permalink
Abort fetch loader as long as loading has not ended
Browse files Browse the repository at this point in the history
Fixes #6054
  • Loading branch information
robwalch committed Dec 26, 2023
1 parent 91234f4 commit 732f595
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils/fetch-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ class FetchLoader implements Loader<LoaderContext> {
}

abortInternal(): void {
const response = this.response;
if (this.controller && !response?.ok) {
if (this.controller && !this.stats.loading.end) {
this.stats.aborted = true;
this.controller.abort();
}
Expand Down

0 comments on commit 732f595

Please sign in to comment.