Skip to content

Commit 9376ac8

Browse files
committed
add if condition back to prevent call stack issue
1 parent 6cabf37 commit 9376ac8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/toolkit/src/matchers.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@ export function isRejectedWithValue<
241241
return action && action.meta && action.meta.rejectedWithValue
242242
}
243243

244+
if (asyncThunks.length === 0) {
245+
return isAllOf(isRejected(...asyncThunks), hasFlag)
246+
}
247+
244248
if (!isAsyncThunkArray(asyncThunks)) {
245249
return isRejectedWithValue()(asyncThunks[0])
246250
}

0 commit comments

Comments
 (0)