We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db563d7 commit 95d1bf0Copy full SHA for 95d1bf0
src/decorator-action.ts
@@ -27,10 +27,10 @@ const getActionType = (action: IAction | IActionConstructor | IActionCreator | s
27
}
28
try {
29
if (isArrowFunction(action)) {
30
- const actionCreatorArrowFnRes = (action as IActionCreator)()
+ const actionCreatorArrowFnRes = action()
31
return actionCreatorArrowFnRes.type
32
33
- const classInstance = new (action as IActionConstructor)()
+ const classInstance = new action()
34
return classInstance.type
35
} catch {
36
// Fall back in case action construction failed due to missing arguments
0 commit comments