Skip to content

Commit 6193df0

Browse files
fix: 🐛 update snapshot retrieval in useSyncExternalStore for query parameter initialization
1 parent 6106f3d commit 6193df0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/query-parameter-store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ const createUseQueryParamStore = <P extends z.ZodType>(
235235
const state = useSyncExternalStore(
236236
queryParamStore.subscribe,
237237
// Use the snapshot from the store
238-
() => queryParamStore.getSnapshot(),
238+
() => queryParamStore.getSnapshot(initialQuery),
239239
// Server snapshot
240240
() => queryParamStore.getSnapshot(initialQuery),
241241
)

0 commit comments

Comments
 (0)