We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9376ac8 commit bbb3f22Copy full SHA for bbb3f22
packages/toolkit/src/matchers.ts
@@ -361,11 +361,5 @@ export function isAsyncThunkAction<
361
return isAsyncThunkAction()(asyncThunks[0])
362
}
363
364
- const matchers: Matcher<any>[] = []
365
-
366
- for (const asyncThunk of asyncThunks) {
367
- matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled)
368
- }
369
370
- return isAnyOf(...matchers)
+ return isAnyOf(...asyncThunks.flatMap(asyncThunk => [asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled]))
371
0 commit comments