-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Milestone
Description
Describe the bug
Request.params is null in handle hook.
Logs
To Reproduce
- Create a route that uses params, e.g.
src/routes/[product]/index.svelte - Create a hook with
handlefunction located atsrc/hooks.ts - Try to access
request.paramsinhandlefunction
Example repo: https://github.com/RaeesBhatti/svelte-params-bug
Expected behavior
request.params should be available in handle function of hooks.
Stacktraces
Information about your SvelteKit Installation:
Diagnostics
System:
OS: macOS 11.2.3
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 535.77 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.8.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.7 - /usr/local/bin/npm
Browsers:
Chrome: 90.0.4430.85
Safari: 14.0.3
Safari Technology Preview: 14.2
npmPackages:
@sveltejs/kit: next => 1.0.0-next.87
svelte: ^3.29.0 => 3.37.0
-
Your browser: Safari Version 14.0.3 (16610.4.3.1.7)
-
Your adapter: Cloudflare Worker but this issues comes up even in
devmode.
Severity
Blocking usage of SvelteKit because I need params to fetch the right data from database.
Additional context
bs1180
Metadata
Metadata
Assignees
Labels
No labels