0
0
Fork 0

Fix spurious loading bar middleware usage (#31592)

This commit is contained in:
Claire 2024-08-26 18:38:34 +02:00 committed by GitHub
parent 4c2534d12e
commit e38ce3beb7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 10 deletions

View file

@ -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;