We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7069c8e + 5f0b50e commit c2bd3aeCopy full SHA for c2bd3ae
app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information.js
@@ -28,9 +28,16 @@ define([
28
* @return {String}
29
*/
30
getShippingMethodTitle: function () {
31
- var shippingMethod = quote.shippingMethod();
+ var shippingMethod = quote.shippingMethod(),
32
+ shippingMethodTitle = '';
33
- return shippingMethod ? shippingMethod['carrier_title'] + ' - ' + shippingMethod['method_title'] : '';
34
+ if (typeof shippingMethod['method_title'] !== 'undefined') {
35
+ shippingMethodTitle = ' - ' + shippingMethod['method_title'];
36
+ }
37
+
38
+ return shippingMethod ?
39
+ shippingMethod['carrier_title'] + shippingMethodTitle :
40
+ shippingMethod['carrier_title'];
41
},
42
43
/**
0 commit comments