Skip to content

Commit 10f880c

Browse files
committed
Correction in the shipping method if it is empty it no longer shows the indefinite word
1 parent eb27ac2 commit 10f880c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,15 @@ define([
2929
*/
3030
getShippingMethodTitle: function () {
3131
var shippingMethod = quote.shippingMethod();
32+
var shippingMethodTitle = '';
3233

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 ? shippingMethod['carrier_title'] + shippingMethodTitle : shippingMethod['carrier_title'];
39+
40+
//return shippingMethod ? shippingMethod['carrier_title'] + ' - ' + shippingMethod['method_title'] : '';
3441
},
3542

3643
/**

0 commit comments

Comments
 (0)