diff --git a/src/models/login.js b/src/models/login.js index 22a563da4f835a83c51fda13cbc71b923a09241b..b5d226aa6bb893f569ba9a3b868116f34bf0e3ed 100644 --- a/src/models/login.js +++ b/src/models/login.js @@ -53,14 +53,17 @@ export default { }, }); reloadAuthorized(); - yield put( - routerRedux.replace({ - pathname: '/user/login', - search: stringify({ - redirect: window.location.href, - }), - }) - ); + // redirect + if (window.location.pathname !== '/user/login') { + yield put( + routerRedux.replace({ + pathname: '/user/login', + search: stringify({ + redirect: window.location.href, + }), + }) + ); + } }, },