@monei-js/components 1.7.4 → 1.7.5

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.
@@ -15605,12 +15605,14 @@ var options$4 = {
15605
15605
  type: zoid.PROP_TYPE.FUNCTION,
15606
15606
  required: false,
15607
15607
  value: function value(_ref2) {
15608
- var props = _ref2.props;
15608
+ var props = _ref2.props,
15609
+ state = _ref2.state;
15609
15610
  var rootNode = document.createElement('div');
15610
15611
  document.body.appendChild(rootNode);
15611
15612
  return function (_ref3) {
15612
15613
  var amount = _ref3.amount,
15613
15614
  currency = _ref3.currency;
15615
+ if (state.isOpen) return;
15614
15616
  var shouldOpen = true;
15615
15617
 
15616
15618
  if (props.onBeforeOpen) {
@@ -15618,11 +15620,13 @@ var options$4 = {
15618
15620
  }
15619
15621
 
15620
15622
  if (!shouldOpen) return;
15623
+ state.isOpen = true;
15621
15624
  var bizumModal = new BizumModal(_extends({
15622
15625
  amount: amount,
15623
15626
  currency: currency
15624
15627
  }, props, {
15625
15628
  onClose: function onClose() {
15629
+ state.isOpen = false;
15626
15630
  window.onpopstate = null;
15627
15631
  document.body.style.overflow = '';
15628
15632
  },