Skip to content

Commit

Permalink
Merge pull request #2960 from fxzhukov/fix-multiple-redirect-on-auth-…
Browse files Browse the repository at this point in the history
…error

Fix multiple redirect events on auth error
  • Loading branch information
fzaninotto authored Mar 8, 2019
2 parents 9a8a2d5 + 7e5bd9f commit 3248831
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/ra-core/src/sideEffect/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { all, put, call, select, takeEvery } from 'redux-saga/effects';
import {
all,
put,
call,
select,
takeLatest,
takeEvery,
} from 'redux-saga/effects';
import { push, replace } from 'react-router-redux';

import { AuthProvider } from '../types';
Expand Down Expand Up @@ -111,7 +118,7 @@ export default (authProvider?: AuthProvider) => {
return function* watchAuthActions() {
yield all([
takeEvery(action => action.meta && action.meta.auth, handleAuth),
takeEvery(FETCH_ERROR, handleAuth),
takeLatest(FETCH_ERROR, handleAuth),
]);
};
};

0 comments on commit 3248831

Please sign in to comment.