Fix spurious loading bar middleware usage (#31592)
This commit is contained in:
parent
4c2534d12e
commit
e38ce3beb7
3 changed files with 15 additions and 10 deletions
|
@ -48,8 +48,9 @@ export const loadingBarMiddleware = (
|
|||
let isRejected = false;
|
||||
|
||||
if (
|
||||
isAsyncThunkAction(action)
|
||||
// TODO: once we get the first use-case for it, add a check for skipLoading
|
||||
isAsyncThunkAction(action) &&
|
||||
'useLoadingBar' in action.meta &&
|
||||
action.meta.useLoadingBar
|
||||
) {
|
||||
if (isThunkActionPending(action)) isPending = true;
|
||||
else if (isThunkActionFulfilled(action)) isFulfilled = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue