File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
app/code/Magento/CheckoutAgreements/view/frontend/web/js/model Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ define(
14
14
var checkoutConfig = window . checkoutConfig ,
15
15
agreementsConfig = checkoutConfig ? checkoutConfig . checkoutAgreements : { } ;
16
16
17
+ var agreementsInputPath = '.payment-method._active div.checkout-agreements input' ;
18
+
17
19
return {
18
20
/**
19
21
* Validate checkout agreements
@@ -25,6 +27,10 @@ define(
25
27
return true ;
26
28
}
27
29
30
+ if ( $ ( agreementsInputPath ) . length == 0 ) {
31
+ return true ;
32
+ }
33
+
28
34
return $ ( '#co-payment-form' ) . validate ( {
29
35
errorClass : 'mage-error' ,
30
36
errorElement : 'div' ,
@@ -36,7 +42,7 @@ define(
36
42
}
37
43
errorPlacement . after ( error ) ;
38
44
}
39
- } ) . element ( '.payment-method._active div.checkout-agreements input' ) ;
45
+ } ) . element ( agreementsInputPath ) ;
40
46
}
41
47
}
42
48
}
You can’t perform that action at this time.
0 commit comments