kauth-sdk-node 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -38,7 +38,7 @@ class MarmotUtil {
|
|
|
38
38
|
}
|
|
39
39
|
async get(path, params) {
|
|
40
40
|
// 兼容老的写法
|
|
41
|
-
if (params.userId) {
|
|
41
|
+
if (params && params.userId) {
|
|
42
42
|
this.setUserId(String(params.userId));
|
|
43
43
|
}
|
|
44
44
|
const uri = this.resolveUri(path, params);
|
|
@@ -49,7 +49,7 @@ class MarmotUtil {
|
|
|
49
49
|
}
|
|
50
50
|
async post(path, params, config) {
|
|
51
51
|
// 兼容老的写法
|
|
52
|
-
if (params.userId) {
|
|
52
|
+
if (params && params.userId) {
|
|
53
53
|
this.setUserId(String(params.userId));
|
|
54
54
|
}
|
|
55
55
|
const uri = this.resolveUri(path);
|
|
@@ -61,7 +61,7 @@ class MarmotUtil {
|
|
|
61
61
|
}
|
|
62
62
|
async del(path, params) {
|
|
63
63
|
// 兼容老的写法
|
|
64
|
-
if (params.userId) {
|
|
64
|
+
if (params && params.userId) {
|
|
65
65
|
this.setUserId(String(params.userId));
|
|
66
66
|
}
|
|
67
67
|
const uri = this.resolveUri(path, params);
|