feat: 移除对 error 的无用判断

Variable 'error' is null checked here, but afterwards at line 68 , it is passed as the first parameter of 'errorLog()' without null check. Note that the parameter's property is accessed in the function body at line 72 of src/api/tools.js.
This commit is contained in:
FairyEver
2020-06-08 15:48:21 +08:00
parent 7813419f8e
commit 079fd1c280

View File

@@ -48,7 +48,6 @@ function createService () {
}
},
error => {
if (error) {
const status = get(error, 'response.status')
switch (status) {
case 400: error.message = '请求错误'; break
@@ -64,7 +63,6 @@ function createService () {
case 505: error.message = 'HTTP版本不受支持'; break
default: break
}
}
errorLog(error)
return Promise.reject(error)
}