util-helpers 4.20.3 → 4.20.4

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.
package/esm/VERSION.js CHANGED
@@ -1,4 +1,4 @@
1
- var VERSION = "4.20.3";
1
+ var VERSION = "4.20.4";
2
2
  var VERSION$1 = VERSION;
3
3
 
4
4
  export { VERSION$1 as default };
package/esm/index.js CHANGED
@@ -63,6 +63,6 @@ export { default as findTreeSelect } from './findTreeSelect.js';
63
63
  export { setDisableWarning } from './utils/config.js';
64
64
  export { default as VERSION } from './VERSION.js';
65
65
 
66
- var version = "4.20.3";
66
+ var version = "4.20.4";
67
67
 
68
68
  export { version };
@@ -10,17 +10,22 @@ function getBlob(img, ajaxOptions) {
10
10
  resolve(img);
11
11
  }
12
12
  else {
13
- ajax(img, __assign({ responseType: 'blob', headers: { 'sec-fetch-site': 'none' } }, ajaxOptions))
13
+ ajax(img, __assign({ responseType: 'blob' }, ajaxOptions))
14
14
  .then(function (ev) {
15
15
  var responseStatus = ev.target.status;
16
16
  if (SuccessResponseStatus.indexOf(responseStatus) !== -1) {
17
17
  resolve(ev.target.response);
18
18
  }
19
19
  else {
20
- reject(new Error("[loadImageWithBlob] The image does not support get requests, responseStatus ".concat(responseStatus, ", '").concat(img, "'.")));
20
+ var err = new Error("[loadImageWithBlob] The image does not support get requests, responseStatus ".concat(responseStatus, ", '").concat(img, "'."));
21
+ console.error(err);
22
+ reject(err);
21
23
  }
22
24
  })
23
- .catch(reject);
25
+ .catch(function (err) {
26
+ console.error(new Error("[loadImageWithBlob] Failed to request image. ".concat(err)));
27
+ reject(err);
28
+ });
24
29
  }
25
30
  });
26
31
  }
package/lib/VERSION.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var VERSION = "4.20.3";
3
+ var VERSION = "4.20.4";
4
4
  var VERSION$1 = VERSION;
5
5
 
6
6
  module.exports = VERSION$1;
package/lib/index.js CHANGED
@@ -65,7 +65,7 @@ var findTreeSelect = require('./findTreeSelect.js');
65
65
  var config = require('./utils/config.js');
66
66
  var VERSION = require('./VERSION.js');
67
67
 
68
- exports.version = "4.20.3";
68
+ exports.version = "4.20.4";
69
69
 
70
70
  exports.isMobile = isMobile;
71
71
  exports.isTelephone = isTelephone;
@@ -12,17 +12,22 @@ function getBlob(img, ajaxOptions) {
12
12
  resolve(img);
13
13
  }
14
14
  else {
15
- ajax(img, tslib.__assign({ responseType: 'blob', headers: { 'sec-fetch-site': 'none' } }, ajaxOptions))
15
+ ajax(img, tslib.__assign({ responseType: 'blob' }, ajaxOptions))
16
16
  .then(function (ev) {
17
17
  var responseStatus = ev.target.status;
18
18
  if (SuccessResponseStatus.indexOf(responseStatus) !== -1) {
19
19
  resolve(ev.target.response);
20
20
  }
21
21
  else {
22
- reject(new Error("[loadImageWithBlob] The image does not support get requests, responseStatus ".concat(responseStatus, ", '").concat(img, "'.")));
22
+ var err = new Error("[loadImageWithBlob] The image does not support get requests, responseStatus ".concat(responseStatus, ", '").concat(img, "'."));
23
+ console.error(err);
24
+ reject(err);
23
25
  }
24
26
  })
25
- .catch(reject);
27
+ .catch(function (err) {
28
+ console.error(new Error("[loadImageWithBlob] Failed to request image. ".concat(err)));
29
+ reject(err);
30
+ });
26
31
  }
27
32
  });
28
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "util-helpers",
3
- "version": "4.20.3",
3
+ "version": "4.20.4",
4
4
  "description": "一个基于业务场景的工具方法库",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",