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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user