Comparing version 1.19.0 to 1.19.1
@@ -228,3 +228,3 @@ import { getDefaultThrottle, error, debug, parseAsString, parseAsInteger, parseAsFloat, parseAsBoolean, parseAsTimestamp, parseAsIsoDateTime, parseAsStringEnum, parseAsJson, parseAsArrayOf, safeParse, renderQueryString } from './chunk-VJE6YUVV.js'; | ||
function patchHistory() { | ||
const version = "1.19.0"; | ||
const version = "1.19.1"; | ||
const patched = history.__nuqs_patched; | ||
@@ -411,2 +411,17 @@ if (patched) { | ||
); | ||
React.useEffect(() => { | ||
if (window.next?.version !== "14.0.3") { | ||
return; | ||
} | ||
const state = parseMap( | ||
keyMap, | ||
initialSearchParams, | ||
queryRef.current, | ||
stateRef.current | ||
); | ||
setInternalState(state); | ||
}, [ | ||
Object.keys(keyMap).map((key) => initialSearchParams?.get(key)).join("&"), | ||
keys | ||
]); | ||
React.useInsertionEffect(() => { | ||
@@ -510,2 +525,5 @@ function updateInternalState(state) { | ||
obj[key] = value ?? defaultValue ?? null; | ||
if (cachedQuery) { | ||
cachedQuery[key] = query; | ||
} | ||
return obj; | ||
@@ -512,0 +530,0 @@ }, {}); |
{ | ||
"name": "nuqs", | ||
"version": "1.19.0", | ||
"version": "1.19.1", | ||
"description": "Type-safe search params state manager for Next.js - Like React.useState, but stored in the URL query string", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
138614
2554