Skip to content

Commit 68fbacf

Browse files
author
Philipp Zerelles
committed
fix: on rehydrate, when page has no query params, construct them from location.search (#1218)
1 parent bd01b6f commit 68fbacf

File tree

1 file changed

+1
-1
lines changed
  • packages/kit/src/runtime/server/page

1 file changed

+1
-1
lines changed

packages/kit/src/runtime/server/page/render.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export async function render_response({
136136
page: {
137137
host: ${page.host ? s(page.host) : 'location.host'}, // TODO this is redundant
138138
path: ${s(page.path)},
139-
query: new URLSearchParams(${s(page.query.toString())}),
139+
query: new URLSearchParams(${page.query.toString().length > 0 ? s(page.query.toString()) : 'location.search'}),
140140
params: ${s(page.params)}
141141
}
142142
}` : 'null'}

0 commit comments

Comments
 (0)