Skip to content

Commit 5e256a6

Browse files
committed
remove unnecessary cast
1 parent 52d8d12 commit 5e256a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/toolkit/src/createSlice.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,8 +1017,8 @@ export function buildCreateSlice<
10171017
'Please use reducer creators passed to callback. Each reducer definition must have a `_reducerDefinitionType` property indicating which handler to use.',
10181018
)
10191019
}
1020-
const handler = handlers[type as RegisteredReducerType]
1021-
if (!handler) {
1020+
const handle = handlers[type]
1021+
if (!handle) {
10221022
throw new Error(`Unsupported reducer type: ${String(type)}`)
10231023
}
10241024
const reducerDetails: ReducerDetails = {
@@ -1027,7 +1027,7 @@ export function buildCreateSlice<
10271027
reducerPath,
10281028
type: getType(name, reducerName),
10291029
}
1030-
handler(
1030+
handle(
10311031
reducerDetails,
10321032
reducerDefinition as any,
10331033
getContext(reducerDetails),

0 commit comments

Comments
 (0)