diff --git a/vendor/paypal/module-braintree-core/view/adminhtml/web/js/system.js
b/vendor/paypal/module-braintree-core/view/adminhtml/web/js/system.js
index 1313f215e..cfa34c760 100644
--- a/vendor/paypal/module-braintree-core/view/adminhtml/web/js/system.js
+++ b/vendor/paypal/module-braintree-core/view/adminhtml/web/js/system.js
@@ -200,7 +200,7 @@ require(['jquery', 'Magento_Ui/js/modal/alert', 'mage/translate', 'domReady!'],
     $('[data-ui-id="select-groups-braintree-section-groups-braintree-groups-braintree-paypal-groups-styling-fields-payment-location-value"]').change(function () {
         hidePaypalSections();
     });
-    locations.each(function (loc) {
+    $.each(locations, function (loc) {
         $('[data-ui-id="select-groups-braintree-section-groups-braintree-groups-braintree-paypal-groups-styling-groups-button-'+loc+'-fields-paypal-location-'+loc+'-button-type-value"]').change(function () {
             hidePaypalSections();
         });
@@ -215,7 +215,7 @@ require(['jquery', 'Magento_Ui/js/modal/alert', 'mage/translate', 'domReady!'],
         }
         merchantCountryIndex = mainLocation.attr('id').split('_')[1];
         mainType = $('[data-ui-id="select-groups-braintree-section-groups-braintree-groups-braintree-paypal-groups-styling-groups-button-'+mainLocation.val()+'-fields-paypal-location-'+mainLocation.val()+'-button-type-value"]');
-        locations.each(function (loc) {
+        $.each(locations, function (loc) {
             $('#row_payment_' + merchantCountryIndex + '_braintree_section_braintree_braintree_paypal_styling_button_' + loc).hide();
             buttonTypes.each(function (type) {
                 $('#row_payment_'+merchantCountryIndex+'_braintree_section_braintree_braintree_paypal_styling_button_'+loc+'_button_location_'+loc+'_type_' + type).hide();