You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In the src/cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/validateComponents.js -> validateComponents function, there is a check to see if store.selectedMethod exists in the customMethods object:
if (store.selectedMethod in customMethods) {
customMethods[store.selectedMethod]();
}
However, the customMethods object is always initialized as an empty object: const customMethods = {};
Since no methods are added to the customMethods object before this check, the condition store.selectedMethod in customMethods will always evaluate to false. This means that customMethods[store.selectedMethod]() can never be invoked under the current implementation.
Steps to Reproduce
Inspect the code within the validateComponents function.
Notice that the customMethods object is initialized as an empty object.
See that there is no code that adds methods to customMethods before the conditional check.
Expected Behavior
If store.selectedMethod is expected to invoke a method, relevant functions should be added to the customMethods object, or the code should be modified to handle the case where customMethods is empty.
The text was updated successfully, but these errors were encountered:
Thank you for raising this issue. I have created an investigation ticket about this issue and the other one you raised for displayValidationErrors().
Once we've completed the investigation, you will be informed.
Describe the bug
In the src/cartridges/app_adyen_SFRA/cartridge/client/default/js/adyen_checkout/validateComponents.js -> validateComponents function, there is a check to see if store.selectedMethod exists in the customMethods object:
However, the customMethods object is always initialized as an empty object:
const customMethods = {};
Since no methods are added to the customMethods object before this check, the condition store.selectedMethod in customMethods will always evaluate to false. This means that
customMethods[store.selectedMethod]()
can never be invoked under the current implementation.Steps to Reproduce
Expected Behavior
If store.selectedMethod is expected to invoke a method, relevant functions should be added to the customMethods object, or the code should be modified to handle the case where customMethods is empty.
The text was updated successfully, but these errors were encountered: