-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$page.query
not available in production mode
#2444
Comments
Ah, yes, you're right. It's really not obvious 😄 #2363 would solve this so that users can't make that mistake |
This was referenced Sep 16, 2021
Here is a potential workaround client-side only : // import { page } from '$app/stores';
import { browser } from '$app/env';
export let param /* = $page.query.get('param') */;
$: {
if (browser) {
const urlParams = new URLSearchParams(window.location.search);
param = urlParams.get('param');
}
} |
@benmccann Can we close this in favor of #2361? It doesn't sound to me like there's anything else going on here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
It appears that, at least for
adapter-static
,$page.query
is not available in production modeOriginally reported by @Abarnob in svelte-society/sveltesociety.dev#108
Reproduction
If you navigate to http://localhost:3000/help/submitting?type=tool then the query parameter is ignored and the dropdown in not correctly populated. It works in dev mode
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
No response
The text was updated successfully, but these errors were encountered: