Repository navigation
fix: preserve repeated search params in client page segment cache keys - #94863
Merged
Merged
Conversation
Contributor
Tests PassedCommit: 2023d01 |
Contributor
Stats cancelledCommit: 2023d01 |
icyJoseph
force-pushed
the
worktree-stale-query-param-cache-key
branch
from
June 16, 2026 22:53
aa546bf to
eb244b3
Compare
icyJoseph
marked this pull request as ready for review
June 16, 2026 22:53
acdlite
approved these changes
Jun 26, 2026
This was referenced Jul 23, 2026
This was referenced Aug 3, 2026
m-kawafuji
pushed a commit
to m-kawafuji/next.js
that referenced
this pull request
Aug 8, 2026
vercel#94863) Fixes: vercel#94821, vercel#92787, vercel#93104 Using `Object.fromEntries` on URLSearchParams, drops repeated keys. ```js const s = '?foo=bar&foo=baz' Object.fromEntries(new URLSearchParams(s)) // { foo: 'baz' } ``` There's already a function, `urlSearchParamsToParsedUrlQuery`, which handles this case. https://github.com/vercel/next.js/blob/40296fe53f40ffe6a0e2184879bd5e294d271ce4/packages/next/src/client/route-params.ts#L235 ```js urlSearchParamsToParsedUrlQuery(new URLSearchParams(s)) // { foo: ['bar', 'baz'] } ``` - [x] The e2e off one of the issue reports, I'll try to simplify it.
This was referenced Aug 15, 2026
|
it sounds like this fixes #92152 too, no? |
12 of 13 tasks
This was referenced Aug 24, 2026
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #94821, #92787, #93104
Using
Object.fromEntrieson URLSearchParams, drops repeated keys.There's already a function,
urlSearchParamsToParsedUrlQuery, which handles this case.next.js/packages/next/src/client/route-params.ts
Line 235 in 40296fe