Skip to content

Commit

Permalink
fix: add search param for prefetch cache
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi committed May 20, 2024
1 parent f8bd21c commit 48e5974
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ export function createInitialRouterState({
// Seed the prefetch cache with this page's data.
// This is to prevent needlessly re-prefetching a page that is already reusable,
// and will avoid triggering a loading state/data fetch stall when navigating back to the page.
const url = new URL(location.pathname, location.origin)
const url = new URL(
`${location.pathname}${location.search}`,
location.origin
)

const initialFlightData: FlightData = [['', initialTree, null, null]]
createPrefetchCacheEntryForInitialLoad({
Expand Down

0 comments on commit 48e5974

Please sign in to comment.