@depay/widgets 12.3.4 → 12.3.6

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/umd/index.js CHANGED
@@ -27408,11 +27408,6 @@
27408
27408
  setRelease(true);
27409
27409
  setClosable(true);
27410
27410
  setForwardTo(item.message.forward_to);
27411
- if (!!item.message.forward_to) {
27412
- setTimeout(function () {
27413
- props.document.location.href = item.message.forward_to;
27414
- }, 200);
27415
- }
27416
27411
  } else if (success == false) {
27417
27412
  setClosable(true);
27418
27413
  set(['PaymentFailed']);
@@ -27572,9 +27567,6 @@
27572
27567
  if (data && data.forward_to) {
27573
27568
  setClosable(true);
27574
27569
  setForwardTo(data.forward_to);
27575
- setTimeout(function () {
27576
- props.document.location.href = data.forward_to;
27577
- }, 200);
27578
27570
  } else {
27579
27571
  setClosable(true);
27580
27572
  }
@@ -27629,6 +27621,11 @@
27629
27621
  return _ref3.apply(this, arguments);
27630
27622
  };
27631
27623
  }();
27624
+ React.useEffect(function () {
27625
+ if (forwardTo) {
27626
+ props.document.location.href = forwardTo;
27627
+ }
27628
+ }, [forwardTo]);
27632
27629
  React.useEffect(function () {
27633
27630
  if (!polling) {
27634
27631
  return;