Skip to content

Commit 2e7ba93

Browse files
author
欧如栋
committed
语法兼容
1 parent b776111 commit 2e7ba93

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const responseSuccess = response => {
1414
}
1515

1616
const responseFailed = error => {
17-
const url = error.config?.url
17+
const url = error && error.config && error.config.url
1818
console.error('网络请求错误', `(${url})`);
1919
logger.error(`网络请求错误 (${url})`);
2020
logger.error(JSON.stringify(util.inspect(error)));

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "coding-generic",
3-
"version": "1.2.11",
3+
"version": "1.2.12",
44
"description": "",
55
"main": "index.js",
66
"bin": {

0 commit comments

Comments
 (0)