idmission-web-sdk 2.2.167 → 2.2.168

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/dist/sdk2.esm.js CHANGED
@@ -204,7 +204,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
204
204
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
205
205
  };
206
206
 
207
- var webSdkVersion = '2.2.167';
207
+ var webSdkVersion = '2.2.168';
208
208
 
209
209
  function getPlatform() {
210
210
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -8872,7 +8872,10 @@ var DocumentCaptureStateProvider = function DocumentCaptureStateProvider(_a) {
8872
8872
  });
8873
8873
  });
8874
8874
  }, [uploadDocument]);
8875
+ var sessionCheckState = useAuthContext()[0].sessionCheckState;
8876
+ var sessionReady = sessionCheckState === 'PASSED';
8875
8877
  useEffect(function () {
8878
+ if (!sessionReady) return;
8876
8879
  var resolvedDocuments = (documents === null || documents === void 0 ? void 0 : documents.length) ? documents.map(function (d) {
8877
8880
  return _assign(_assign({
8878
8881
  title: 'Document Capture',
@@ -8899,7 +8902,7 @@ var DocumentCaptureStateProvider = function DocumentCaptureStateProvider(_a) {
8899
8902
  void uploadCapturedDocument(d.content, d.content.type);
8900
8903
  }
8901
8904
  });
8902
- }, [aspectRatio, cameraFeedMode, documents, instructions, uploadCapturedDocument]);
8905
+ }, [aspectRatio, cameraFeedMode, documents, instructions, sessionReady, uploadCapturedDocument]);
8903
8906
  useEffect(function () {
8904
8907
  dispatch({
8905
8908
  type: 'setHooks',