zmdms-utils 0.0.92 → 0.0.93

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.
@@ -243,7 +243,9 @@ var AxiosRequest = /** @class */ (function () {
243
243
  }
244
244
  if (isAuth) {
245
245
  var token = getPreToken();
246
- newOptions.headers[this.tokenKey] = token;
246
+ if (token) {
247
+ newOptions.headers[this.tokenKey] = token;
248
+ }
247
249
  }
248
250
  // 遍历params,将undefined值 转为null值
249
251
  if (newOptions.data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zmdms-utils",
3
- "version": "0.0.92",
3
+ "version": "0.0.93",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
package/src/request.ts CHANGED
@@ -295,7 +295,9 @@ export class AxiosRequest {
295
295
  }
296
296
  if (isAuth) {
297
297
  const token = getPreToken();
298
- newOptions.headers[this.tokenKey] = token;
298
+ if (token) {
299
+ newOptions.headers[this.tokenKey] = token;
300
+ }
299
301
  }
300
302
 
301
303
  // 遍历params,将undefined值 转为null值