Skip to content

Commit e888b32

Browse files
committed
prevent implicit return
1 parent b1dd066 commit e888b32

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/toolkit/src/entities/slice_creator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ const makeWrappedReducerCreator =
8585
selectEntityState: (state: State) => EntityState<T, Id>,
8686
) =>
8787
<Payload>(
88-
reducer: (
88+
mutator: (
8989
state: EntityState<T, Id>,
9090
action: PayloadAction<Payload>,
9191
) => void,
9292
): CaseReducerDefinition<State, PayloadAction<Payload>> =>
93-
reducerCreator.create<Payload>((state: State, action) =>
94-
reducer(selectEntityState(state), action),
95-
)
93+
reducerCreator.create<Payload>((state: State, action) => {
94+
mutator(selectEntityState(state), action)
95+
})
9696

9797
export function createEntityMethods<
9898
T,

0 commit comments

Comments
 (0)