diff --git a/packages/next-usequerystate/src/cache.ts b/packages/next-usequerystate/src/cache.ts index 81ae1550..5305ceb7 100644 --- a/packages/next-usequerystate/src/cache.ts +++ b/packages/next-usequerystate/src/cache.ts @@ -20,8 +20,9 @@ export function createSearchParamCache< const c = getCache() for (const key in parsers) { const parser = parsers[key]! - c[key as Keys] = parser.parseServerSide(searchParams[key]) + c[key] = parser.parseServerSide(searchParams[key]) } + return Object.freeze(c) } function getSearchParam( key: Key