Skip to content

Commit 2aff467

Browse files
authored
fix(hydration): set fetchMeta to null by default to make it serializable (#1371)
1 parent 4d01e1f commit 2aff467

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/query.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ export class Query<TData = unknown, TError = unknown, TQueryFnData = TData> {
439439
errorUpdateCount: 0,
440440
errorUpdatedAt: 0,
441441
fetchFailureCount: 0,
442-
fetchMeta: undefined,
442+
fetchMeta: null,
443443
isFetching: false,
444444
isInvalidated: false,
445445
isPaused: false,
@@ -471,7 +471,7 @@ export class Query<TData = unknown, TError = unknown, TQueryFnData = TData> {
471471
return {
472472
...state,
473473
fetchFailureCount: 0,
474-
fetchMeta: action.meta,
474+
fetchMeta: action.meta ?? null,
475475
isFetching: true,
476476
isPaused: false,
477477
status: state.status === 'idle' ? 'loading' : state.status,

0 commit comments

Comments
 (0)