Преглед на файлове

fix Unexpected use of 'location' no-restricted-globals error (#654)

WhatAKitty преди 8 години
родител
ревизия
5820d95064
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/models/login.js

+ 2 - 2
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();
     },
   },