Disable the Vaulting checkbox on page load before handling the UI

Otherwise the Pay Later options would stay disabled when vaulting was disabled from the PayPal account.
This commit is contained in:
Danae Millan 2021-11-22 12:53:00 -03:00
parent 3d03097110
commit b42e3d5623

View file

@ -65,8 +65,8 @@
atLeastOneChecked(vaultingCheckboxes) ? disablePayLater() : enablePayLater()
}
togglePayLater()
disableAll( disabledCheckboxes )
togglePayLater()
vaultingCheckboxes.forEach(node => node.addEventListener('change', togglePayLater));
}