File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -574,15 +574,10 @@ export function createSlice<
574
574
}
575
575
}
576
576
577
- const initialState =
578
- typeof options . initialState == 'function'
579
- ? options . initialState
580
- : freezeDraftable ( options . initialState )
581
-
582
577
const reducers =
583
- typeof options . reducers === 'function'
578
+ ( typeof options . reducers === 'function'
584
579
? options . reducers ( buildReducerCreators < State > ( ) )
585
- : options . reducers || { }
580
+ : options . reducers ) || { }
586
581
587
582
const reducerNames = Object . keys ( reducers )
588
583
@@ -636,7 +631,7 @@ export function createSlice<
636
631
...context . sliceCaseReducersByType ,
637
632
}
638
633
639
- return createReducer ( initialState , ( builder ) => {
634
+ return createReducer ( options . initialState , ( builder ) => {
640
635
for ( let key in finalCaseReducers ) {
641
636
builder . addCase ( key , finalCaseReducers [ key ] as CaseReducer < any > )
642
637
}
You can’t perform that action at this time.
0 commit comments