We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 17ca3a9 commit c1f492cCopy full SHA for c1f492c
packages/core/src/request.ts
@@ -85,6 +85,11 @@ export class Request {
85
}
86
87
public cancel({ cancelled = false, interrupted = false }: { cancelled?: boolean; interrupted?: boolean }): void {
88
+ if (this.requestHasFinished) {
89
+ // If the request has already finished, there's no need to cancel it
90
+ return
91
+ }
92
+
93
this.cancelToken.abort()
94
95
this.requestParams.markAsCancelled({ cancelled, interrupted })
0 commit comments