idmission-web-sdk 2.2.123 → 2.2.124

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.
@@ -233,7 +233,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
233
233
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
234
234
  };
235
235
 
236
- var webSdkVersion = '2.2.123';
236
+ var webSdkVersion = '2.2.124';
237
237
 
238
238
  function getPlatform() {
239
239
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -4780,11 +4780,6 @@ var useIdCaptureStore = zustand.create()(middleware.devtools(function (set) {
4780
4780
  }));
4781
4781
  function IdCaptureStateProvider(_a) {
4782
4782
  var children = _a.children;
4783
- React.useEffect(function resetWhenProviderMounts() {
4784
- useIdCaptureStore.getState().dispatch({
4785
- type: 'resetWizard'
4786
- });
4787
- }, []);
4788
4783
  var overrideWrongDocumentTypeGuidance = useIdCaptureStore(shallow.useShallow(function (state) {
4789
4784
  return state.overrideWrongDocumentTypeGuidance;
4790
4785
  }));
@@ -4804,6 +4799,13 @@ function IdCaptureStateProvider(_a) {
4804
4799
  return window.removeEventListener('resize', onResize);
4805
4800
  };
4806
4801
  }, [onResize]);
4802
+ React.useEffect(function resetWhenProviderUnmounts() {
4803
+ return function () {
4804
+ return useIdCaptureStore.getState().dispatch({
4805
+ type: 'resetWizard'
4806
+ });
4807
+ };
4808
+ }, []);
4807
4809
  return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, children);
4808
4810
  }
4809
4811
  var dispatchIdCaptureAction = function dispatchIdCaptureAction(action) {