mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Fixes an oversight where `params`/`searchParams` in client pages would
cause dev instant validation to go down a codepath intended for
build-time instant validation. We'd end up unintentionally wrapping
params with an excaustive proxy which would then crash because the store
is not set up as expected:
```
## Error Message
Route "/store/[slug]": Could not validate `instant` because an error prevented the target segment from rendering.
Next.js version: 16.3.0-preview.5 (Turbopack)
[cause]: Error [InvariantError]: Invariant: Expected to have a workUnitStore that provides validationSampleTracking. This is a bug in Next.js.
at Page (app/store/[slug]/page.tsx:6:11)
4 |
5 | export default function Page(props: PageProps<"/store/[slug]">) {
> 6 | const { slug } = use(props.params);
| ^
7 | return (
8 | <>
9 | <h1>Store {slug}</h1>
}
```
The proxy code should've been gated on `workUnitStore.validationSamples`
like we do in other places that care about samples.