Skip to content

Commit

Permalink
Fix multiple redirect events on auth error
Browse files Browse the repository at this point in the history
  • Loading branch information
fxzhukov committed Mar 4, 2019
1 parent 5dca68b commit ac2d21b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ra-core/src/sideEffect/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { all, put, call, select, takeEvery } from 'redux-saga/effects';
import { all, put, call, select, takeLatest } from 'redux-saga/effects';
import { push, replace } from 'react-router-redux';

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

0 comments on commit ac2d21b

Please sign in to comment.