-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
$page.query.get(...)
returns null
.
To Reproduce
git clone --branch issue-1 https://github.com/falsetru/sveltekit-test.git issue-1
cd issue-1
npm install
npm run build
npx sirv build/ # `npm run start` will hide the issue.
- Run above commands
- Visit http://localhost:5000/?name=abc
Expected behavior
abc
printed, but got null
.
Information about your SvelteKit Installation:
Diagnostics
- The output of
npx envinfo --system --npmPackages svelte,@sveltejs/kit,vite --binaries --browsers
System:
OS: Linux 5.8 Ubuntu 20.10 (Groovy Gorilla)
CPU: (4) x64 Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz
Memory: 763.02 MB / 15.39 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 12.18.2 - /usr/bin/node
npm: 7.7.6 - ~/.npm-packages/bin/npm
Browsers:
Chrome: 89.0.4389.114
Firefox: 87.0
npmPackages:
@sveltejs/kit: next => 1.0.0-next.67
svelte: ^3.29.0 => 3.37.0
vite: ^2.1.0 => 2.1.5
-
Your browser
Google Chrome Version 89.0.4389.114 (Official Build) (64-bit) -
Your adapter
@sveltejs/adapter-static
Additional context
- As a workaround, I am using
new URLSearchParams(document.location.search).get('name')
. - If I modify
kit/packages/kit/src/runtime/server/page.js
Line 398 in 4a1c04a
query: new URLSearchParams(${s(request.query.toString())}), the issue is gone. Not sure whether it's proper way.query: new URLSearchParams(document.location.search),
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working