diff --git a/packages/nuqs/src/useQueryState.ts b/packages/nuqs/src/useQueryState.ts index 2cb765b04..08148783c 100644 --- a/packages/nuqs/src/useQueryState.ts +++ b/packages/nuqs/src/useQueryState.ts @@ -252,7 +252,7 @@ export function useQueryState( ) useEffect(() => { - const query = initialSearchParams.get(key) ?? null + const query = initialSearchParams?.get(key) ?? null if (query === queryRef.current) { return }