Skip to content

Commit 22dc3d7

Browse files
committed
MAGETWO-53798: Braintree Paypal button is active before checkout is loaded
1 parent 7f6e442 commit 22dc3d7

File tree

1 file changed

+6
-2
lines changed
  • app/code/Magento/Braintree/view/frontend/web/js/paypal

1 file changed

+6
-2
lines changed

app/code/Magento/Braintree/view/frontend/web/js/paypal/button.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55
define(
66
[
7+
'rjsResolver',
78
'uiRegistry',
89
'uiComponent',
910
'underscore',
@@ -13,6 +14,7 @@ define(
1314
'domReady!'
1415
],
1516
function (
17+
resolver,
1618
registry,
1719
Component,
1820
_,
@@ -47,8 +49,10 @@ define(
4749
* @param {Object} integration
4850
*/
4951
onReady: function (integration) {
50-
registry.set(this.integrationName, integration);
51-
$('#' + this.id).removeAttr('disabled');
52+
resolver(function () {
53+
registry.set(this.integrationName, integration);
54+
$('#' + this.id).removeAttr('disabled');
55+
}, this);
5256
},
5357

5458
/**

0 commit comments

Comments
 (0)