-
Notifications
You must be signed in to change notification settings - Fork 27.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prevent erroneous route interception during lazy fetch (#64692)
When the router cache can't find a cache node for the requested segment, it performs a request to the server to get the missing data. This request to the server currently will always include the `next-url` header, and on soft-navigations, the router will route the request to the intercepted handler. This lazy fetch is treated as a soft navigation by the server, and will incorrectly return data for the intercepted route. Similar to the handling in `router.refresh`, and the server action reducer, we should not include the `next-url` header if there's no interception route currently in the tree, as otherwise we'll be erroneously triggering the intercepted route. Fixes #64676 Closes NEXT-3146
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
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
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