idmission-web-sdk 1.0.188 → 1.0.190

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.
@@ -48,7 +48,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
48
48
  var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
49
49
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
50
50
 
51
- var webSdkVersion = '1.0.188';
51
+ var webSdkVersion = '1.0.190';
52
52
 
53
53
  function getPlatform() {
54
54
  if (typeof window === 'undefined') return;
@@ -8795,7 +8795,7 @@ var IdCaptureModelsProvider = function IdCaptureModelsProvider(_a) {
8795
8795
  working.current = true;
8796
8796
  (function () {
8797
8797
  return tslib.__awaiter(void 0, void 0, void 0, function () {
8798
- var canvases, prediction, e_1;
8798
+ var canvases, prediction, e_1, errorsToIgnore, shouldIgnoreError;
8799
8799
  var _a, _b, _c;
8800
8800
  return tslib.__generator(this, function (_d) {
8801
8801
  switch (_d.label) {
@@ -8828,10 +8828,15 @@ var IdCaptureModelsProvider = function IdCaptureModelsProvider(_a) {
8828
8828
  return [3 /*break*/, 4];
8829
8829
  case 3:
8830
8830
  e_1 = _d.sent();
8831
- console.log('caught an error while predicting!', e_1);
8832
- if (e_1.message === 'Error: Requested texture size [0x0] is invalid.') {
8833
- console.log("it's the texture one!");
8831
+ errorsToIgnore = ['Requested texture size [0x0] is invalid', 'The image argument is a canvas element with a width or height of 0', 'CanvasRenderingContext2D.drawImage: Passed-in canvas is empty'];
8832
+ shouldIgnoreError = errorsToIgnore.some(function (message) {
8833
+ var _a;
8834
+ return (_a = e_1.message) === null || _a === void 0 ? void 0 : _a.includes(message);
8835
+ });
8836
+ if (shouldIgnoreError) {
8837
+ console.log('ignoring error caught while predicting:', e_1);
8834
8838
  } else {
8839
+ console.log('caught an error while predicting!', e_1);
8835
8840
  throw e_1;
8836
8841
  }
8837
8842
  return [3 /*break*/, 4];