Skip to content

Commit 52d8d12

Browse files
committed
golf
1 parent f86a6d5 commit 52d8d12

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/toolkit/src/createSlice.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,8 +1184,10 @@ export function buildCreateSlice<
11841184
caseReducers: internalContext.sliceCaseReducersByName as any,
11851185
getInitialState,
11861186
...makeSelectorProps(reducerPath),
1187-
injectInto(injectable, { reducerPath: pathOpt, ...config } = {}) {
1188-
const newReducerPath = pathOpt ?? reducerPath
1187+
injectInto(
1188+
injectable,
1189+
{ reducerPath: newReducerPath = reducerPath, ...config } = {},
1190+
) {
11891191
injectable.inject({ reducerPath: newReducerPath, reducer }, config)
11901192
return {
11911193
...slice,

0 commit comments

Comments
 (0)