We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b858fb commit f035bbcCopy full SHA for f035bbc
lib/fetch/request.js
@@ -348,7 +348,10 @@ class Request {
348
if (signal.aborted) {
349
ac.abort(signal.reason)
350
} else {
351
- const abort = () => ac.abort(signal.reason)
+ const acRef = new WeakRef(ac)
352
+ const abort = function () {
353
+ acRef.deref()?.abort(this.reason)
354
+ }
355
signal.addEventListener('abort', abort, { once: true })
356
requestFinalizer.register(this, { signal, abort })
357
}
0 commit comments