Skip to content

Commit a9057c6

Browse files
committedApr 17, 2023
Mark subscriptionsUpdated as autobatched
1 parent ef8480b commit a9057c6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎packages/toolkit/src/query/core/buildSlice.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,11 @@ export function buildSlice({
433433
name: `${reducerPath}/internalSubscriptions`,
434434
initialState: initialState as SubscriptionState,
435435
reducers: {
436-
subscriptionsUpdated(state, action: PayloadAction<Patch[]>) {
437-
return applyPatches(state, action.payload)
436+
subscriptionsUpdated: {
437+
reducer(state, action: PayloadAction<Patch[]>) {
438+
return applyPatches(state, action.payload)
439+
},
440+
prepare: prepareAutoBatched<Patch[]>(),
438441
},
439442
},
440443
})

0 commit comments

Comments
 (0)
Please sign in to comment.