Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit ec5d9b7

Browse files
committed
#17744 Adding isVirtual mock to quote instance && fixs
1 parent 5372c7d commit ec5d9b7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

app/code/Magento/Checkout/view/frontend/web/js/model/checkout-data-resolver.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,16 @@ define([
231231
isBillingAddressInitialized = addressList.some(function (addrs) {
232232
if (addrs.isDefaultBilling()) {
233233
selectBillingAddress(addrs);
234+
234235
return true;
235236
}
237+
236238
return false;
237239
});
238240
}
239241

240242
shippingAddress = quote.shippingAddress();
243+
241244
if (!isBillingAddressInitialized &&
242245
shippingAddress &&
243246
shippingAddress.canUseForBilling() &&

dev/tests/js/jasmine/tests/app/code/Magento/Braintree/frontend/js/view/payment/method-renderer/paypal.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ define([
2424
paymentMethod: ko.observable(),
2525
totals: ko.observable({
2626
'base_grand_total': 0
27-
})
27+
}),
28+
isVirtual: function () {
29+
return false;
30+
}
2831
},
2932
'Magento_Braintree/js/view/payment/adapter': {
3033
config: {},

0 commit comments

Comments
 (0)