File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ export function createAsyncThunk<
115
115
function abort ( reason : string = 'Aborted.' ) {
116
116
abortController . abort ( )
117
117
abortAction = rejected (
118
- new DOMException ( reason , 'AbortError' ) ,
118
+ { name : 'AbortError' , message : reason } ,
119
119
requestId ,
120
120
args
121
121
)
@@ -139,11 +139,7 @@ export function createAsyncThunk<
139
139
args
140
140
)
141
141
} catch ( err ) {
142
- if (
143
- err instanceof DOMException &&
144
- err . name === 'AbortError' &&
145
- abortAction
146
- ) {
142
+ if ( err && err . name === 'AbortError' && abortAction ) {
147
143
// abortAction has already been dispatched, no further action should be dispatched
148
144
// by this thunk.
149
145
// return a copy of the dispatched abortAction, but attach the AbortError to it.
You can’t perform that action at this time.
0 commit comments