Browse Source

request.js

star7th 5 năm trước cách đây
mục cha
commit
121c5b5ccd
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      web_src/src/request.js

+ 1 - 1
web_src/src/request.js

@@ -31,7 +31,7 @@ axios.interceptors.response.use(
         path: '/user/login',
         query: { redirect: router.currentRoute.fullPath }
       })
-    } else if (response.data.error_code !== 0) {
+    } else if (response.data && response.data.error_code !== 0) {
       MessageBox.alert(response.data.error_message)
       return Promise.reject(new Error('something bad happened'))
     }