-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix fetcher interruption cleanup logic after fetcher submissions (#11839
- Loading branch information
1 parent
653d1a8
commit ecdbbde
Showing
3 changed files
with
120 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
"@remix-run/router": patch | ||
--- | ||
|
||
Fix internal cleanup of interrupted fetchers to avoid invalid revalidations on navigations | ||
|
||
- When a `fetcher.load` is interrupted by an `action` submission, we track it internally and force revalidation once the `action` completes | ||
- We previously only cleared out this internal tracking info on a successful _navigation_ submission | ||
- Therefore, if the `fetcher.load` was interrupted by a `fetcher.submit`, then we wouldn't remove it from this internal tracking info on successful load (incorrectly) | ||
- And then on the next navigation it's presence in the internal tracking would automatically trigger execution of the `fetcher.load` again, ignoring any `shouldRevalidate` logic | ||
- This fix cleans up the internal tracking so it applies to both navigation submission and fetcher submissions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters