File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -92,24 +92,24 @@ export function createAsyncThunk<
92
92
meta : {
93
93
args,
94
94
requestId,
95
- ...( error . name === 'AbortError' && {
96
- aborted : true ,
97
- abortReason : error . message
98
- } )
95
+ ...( error &&
96
+ error . name === 'AbortError' && {
97
+ aborted : true ,
98
+ abortReason : error . message
99
+ } )
99
100
}
100
101
}
101
102
}
102
103
)
103
104
104
105
function actionCreator ( args : ActionParams ) {
105
- const abortController = new AbortController ( )
106
-
107
- return function thunkAction (
106
+ return (
108
107
dispatch : TA [ 'dispatch' ] ,
109
108
getState : TA [ 'getState' ] ,
110
109
extra : TA [ 'extra' ]
111
- ) {
110
+ ) => {
112
111
const requestId = nanoid ( )
112
+ const abortController = new AbortController ( )
113
113
let abortAction : ReturnType < typeof rejected > | undefined
114
114
115
115
function abort ( reason : string = 'Aborted.' ) {
You can’t perform that action at this time.
0 commit comments