From 5820d950644698c05c65ac7c91b74eb192dd752f Mon Sep 17 00:00:00 2001 From: WhatAKitty <104xuqiang@163.com> Date: Wed, 10 Jan 2018 23:35:16 +0800 Subject: [PATCH] fix Unexpected use of 'location' no-restricted-globals error (#654) --- src/models/login.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/login.js b/src/models/login.js index 05c1913e..8e6287cf 100644 --- a/src/models/login.js +++ b/src/models/login.js @@ -21,7 +21,7 @@ export default { // Login success after permission changes to admin or user // The refresh will automatically redirect to the home page // yield put(routerRedux.push('/')); - location.reload(); + window.location.reload(); } }, *logout(_, { put }) { @@ -35,7 +35,7 @@ export default { // yield put(routerRedux.push('/user/login')); // Login out after permission changes to admin or user // The refresh will automatically redirect to the login page - location.reload(); + window.location.reload(); }, }, -- GitLab