Skip to content

Commit c2bd3ae

Browse files
authored
ENGCOM-5691: Correction in the shipping method if it is empty it no longer shows t… #24265
2 parents 7069c8e + 5f0b50e commit c2bd3ae

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,16 @@ define([
2828
* @return {String}
2929
*/
3030
getShippingMethodTitle: function () {
31-
var shippingMethod = quote.shippingMethod();
31+
var shippingMethod = quote.shippingMethod(),
32+
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 ?
39+
shippingMethod['carrier_title'] + shippingMethodTitle :
40+
shippingMethod['carrier_title'];
3441
},
3542

3643
/**

0 commit comments

Comments
 (0)