Skip to content

Commit ac15ac0

Browse files
author
ben.durrant
committed
evilness
1 parent 268aea9 commit ac15ac0

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

packages/toolkit/src/createAsyncThunk.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -625,12 +625,16 @@ If you want to use the AbortController to react to \`abort\` events, please cons
625625
})
626626
)
627627
)
628-
const pendingAction = pending(
629-
requestId,
630-
arg,
631-
options?.getPendingMeta?.({ requestId, arg }, { getState, extra })
628+
dispatch(
629+
pending(
630+
requestId,
631+
arg,
632+
options?.getPendingMeta?.(
633+
{ requestId, arg },
634+
{ getState, extra }
635+
)
636+
) as any
632637
)
633-
dispatch(pendingAction)
634638
finalAction = await Promise.race([
635639
abortedPromise,
636640
Promise.resolve(

0 commit comments

Comments
 (0)