next.js
c3bf2a39 - fix: preserve repeated search params in client page segment cache keys (#94863)

Commit
3 days ago
fix: preserve repeated search params in client page segment cache keys (#94863) Fixes: #94821, #92787, #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.
Author
Parents
Loading