Skip to content

Commit 9db9b6f

Browse files
authored
[next-server] remove unnecessary query shallow copy (#78003)
1 parent aa6a9bf commit 9db9b6f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/next/src/shared/lib/router/utils/prepare-destination.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ export function prepareDestination(args: {
208208
params: Params
209209
query: NextParsedUrlQuery
210210
}) {
211-
const query = Object.assign({}, args.query)
212211
const parsedDestination = parseDestination(args)
213212

214213
const { hostname: destHostname, query: destQuery } = parsedDestination
@@ -327,7 +326,7 @@ export function prepareDestination(args: {
327326
// 2. path segment values
328327
// 3. destination specified query values
329328
parsedDestination.query = {
330-
...query,
329+
...args.query,
331330
...parsedDestination.query,
332331
}
333332

0 commit comments

Comments
 (0)