File tree Expand file tree Collapse file tree 2 files changed +6
-14
lines changed
app/code/Magento/Checkout/view/frontend/web/js Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Original file line number Diff line number Diff line change 88define ( [
99 'ko' ,
1010 'underscore' ,
11- 'Magento_Checkout/js/checkout-data' ,
1211 'domReady!'
13- ] , function ( ko , _ , checkoutData ) {
12+ ] , function ( ko , _ ) {
1413 'use strict' ;
1514
1615 /**
@@ -149,17 +148,6 @@ define([
149148 */
150149 isPersistent : function ( ) {
151150 return ! ! Number ( quoteData [ 'is_persistent' ] ) ;
152- } ,
153-
154- /**
155- * @return {String|null }
156- */
157- getSelectedMethod : function ( ) {
158- const selectedShippingMethod = checkoutData . getSelectedShippingRate ( ) ;
159- return selectedShippingMethod ? selectedShippingMethod :
160- this . shippingMethod ( ) ?
161- this . shippingMethod ( ) [ 'carrier_code' ] + '_' + this . shippingMethod ( ) [ 'method_code' ] :
162- null ;
163151 }
164152 } ;
165153} ) ;
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ define([
7373 isNewAddressAdded : ko . observable ( false ) ,
7474 saveInAddressBook : 1 ,
7575 quoteIsVirtual : quote . isVirtual ( ) ,
76+
7677 /**
7778 * @return {exports }
7879 */
@@ -112,6 +113,7 @@ define([
112113
113114 registry . async ( 'checkoutProvider' ) ( function ( checkoutProvider ) {
114115 var shippingAddressData = checkoutData . getShippingAddressFromData ( ) ;
116+
115117 if ( shippingAddressData ) {
116118 checkoutProvider . set (
117119 'shippingAddress' ,
@@ -257,7 +259,9 @@ define([
257259 rates : shippingService . getShippingRates ( ) ,
258260 isLoading : shippingService . isLoading ,
259261 isSelected : ko . computed ( function ( ) {
260- return quote . getSelectedMethod ( ) ;
262+ return quote . shippingMethod ( ) ?
263+ quote . shippingMethod ( ) [ 'carrier_code' ] + '_' + quote . shippingMethod ( ) [ 'method_code' ] :
264+ null ;
261265 } ) ,
262266
263267 /**
You can’t perform that action at this time.
0 commit comments