File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 11import type { Draft } from 'immer'
2- import createNextState , { isDraft , isDraftable , enableES5 } from 'immer'
2+ import createNextState , { isDraft , isDraftable } from 'immer'
33import type { AnyAction , Action , Reducer } from 'redux'
44import type { ActionReducerMapBuilder } from './mapBuilders'
55import { executeReducerBuilderCallback } from './mapBuilders'
@@ -197,12 +197,6 @@ export function createReducer<S>(
197197 actionMatchers : ReadonlyActionMatcherDescriptionCollection < S > = [ ] ,
198198 defaultCaseReducer ?: CaseReducer < S >
199199) : Reducer < S > {
200- // We deliberately enable Immer's ES5 support, on the grounds that
201- // we assume RTK will be used with React Native and other Proxy-less
202- // environments. In addition, that's how Immer 4 behaved, and since
203- // we want to ship this in an RTK minor, we should keep the same behavior.
204- enableES5 ( )
205-
206200 let [ actionsMap , finalActionMatchers , finalDefaultCaseReducer ] =
207201 typeof mapOrBuilderCallback === 'function'
208202 ? executeReducerBuilderCallback ( mapOrBuilderCallback )
Original file line number Diff line number Diff line change 1+ import { enableES5 } from 'immer'
12export * from 'redux'
23export {
34 default as createNextState ,
@@ -17,6 +18,12 @@ export type {
1718export { createDraftSafeSelector } from './createDraftSafeSelector'
1819export type { ThunkAction , ThunkDispatch } from 'redux-thunk'
1920
21+ // We deliberately enable Immer's ES5 support, on the grounds that
22+ // we assume RTK will be used with React Native and other Proxy-less
23+ // environments. In addition, that's how Immer 4 behaved, and since
24+ // we want to ship this in an RTK minor, we should keep the same behavior.
25+ enableES5 ( ) ;
26+
2027export {
2128 // js
2229 configureStore ,
You can’t perform that action at this time.
0 commit comments