mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
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.