-
Notifications
You must be signed in to change notification settings - Fork 22.9k
Fix AbortController being reused in multiple fetch requests in some o… #41043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix AbortController being reused in multiple fetch requests in some o… #41043
Conversation
Preview URLs
(comment last updated: 2025-09-17 01:17:49) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix, @marcindz88 ! The code looks good to me but the description needs tweaking a bit, especially the paragraph starting "We first create a controller...", because we don't, any more :).
@wbamberg Do you think we could leave the example on the AbortController page and include only a link in the methods and constructor to not repeat this or is is a common practice here to include it on all pages for easier accessibility ? |
Yes, I think this is a good idea. I'm not really a fan of this style where we duplicate examples, it's such a maintenance burden. |
…gnal for examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks for the fix @marcindz88 !
Description
The AbortController examples include code that reused the same AbortController instance across multiple fetch calls, which causes them to be instantly cancelled.
Motivation
The documentation should be updated to help developers understand that an AbortController instance cannot be reused.