hunter-open-sdk 1.0.0 → 1.0.1

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.
@@ -299,7 +299,8 @@ function _checkHasDriver() {
299
299
  _context3.t1 = 0;
300
300
  case 15:
301
301
  hasCache = _context3.t1;
302
- state = hasDriver + hasCache;
302
+ // const state = hasDriver + hasCache
303
+ state = 0;
303
304
  _context3.t2 = state;
304
305
  _context3.next = _context3.t2 === 3 ? 20 : _context3.t2 === 1 ? 20 : _context3.t2 === 2 ? 21 : 26;
305
306
  break;
@@ -70,10 +70,10 @@ var deleteGlobalProperty = exports.deleteGlobalProperty = function deleteGlobalP
70
70
  * 安全地获取HunterInspectionKit对象
71
71
  * @returns {Object|null} HunterInspectionKit对象,如果不存在则返回null
72
72
  */
73
- var getHunterInspectionKit = exports.getHunterInspectionKit = function getHunterInspectionKit() {
73
+ var getHunterInspectionKit = exports.getHunterInspectionKit = function getHunterInspectionKit(willInit) {
74
74
  var kit = getGlobalProperty('HunterInspectionKit');
75
75
  if (!kit) {
76
- console.warn('HunterInspectionKit未初始化,请先调用HunterInspectionKit()函数');
76
+ !willInit && console.warn('HunterInspectionKit未初始化,请先调用HunterInspectionKit()函数');
77
77
  return null;
78
78
  }
79
79
  return kit;
@@ -86,10 +86,10 @@ var getHunterInspectionKit = exports.getHunterInspectionKit = function getHunter
86
86
  * @returns {any|null} 方法返回值,如果调用失败则返回null
87
87
  */
88
88
  var callHunterInspectionKit = exports.callHunterInspectionKit = function callHunterInspectionKit(methodName) {
89
- var kit = getHunterInspectionKit();
89
+ var kit = getHunterInspectionKit(true);
90
90
  if (!kit) {
91
91
  (0, _utils.HunterInspectionKit)();
92
- kit = getHunterInspectionKit();
92
+ kit = getHunterInspectionKit(false);
93
93
  }
94
94
  if (!kit || typeof kit[methodName] !== 'function') {
95
95
  console.error("HunterInspectionKit.".concat(methodName, "\u65B9\u6CD5\u4E0D\u5B58\u5728\u6216\u672A\u521D\u59CB\u5316"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hunter-open-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "采货侠SaaS版本桌面端sdk",
5
5
  "scripts": {
6
6
  "start": "zz dev",