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 8
8
define ( [
9
9
'ko' ,
10
10
'underscore' ,
11
- 'Magento_Checkout/js/checkout-data' ,
12
11
'domReady!'
13
- ] , function ( ko , _ , checkoutData ) {
12
+ ] , function ( ko , _ ) {
14
13
'use strict' ;
15
14
16
15
/**
@@ -149,17 +148,6 @@ define([
149
148
*/
150
149
isPersistent : function ( ) {
151
150
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 ;
163
151
}
164
152
} ;
165
153
} ) ;
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ define([
73
73
isNewAddressAdded : ko . observable ( false ) ,
74
74
saveInAddressBook : 1 ,
75
75
quoteIsVirtual : quote . isVirtual ( ) ,
76
+
76
77
/**
77
78
* @return {exports }
78
79
*/
@@ -112,6 +113,7 @@ define([
112
113
113
114
registry . async ( 'checkoutProvider' ) ( function ( checkoutProvider ) {
114
115
var shippingAddressData = checkoutData . getShippingAddressFromData ( ) ;
116
+
115
117
if ( shippingAddressData ) {
116
118
checkoutProvider . set (
117
119
'shippingAddress' ,
@@ -257,7 +259,9 @@ define([
257
259
rates : shippingService . getShippingRates ( ) ,
258
260
isLoading : shippingService . isLoading ,
259
261
isSelected : ko . computed ( function ( ) {
260
- return quote . getSelectedMethod ( ) ;
262
+ return quote . shippingMethod ( ) ?
263
+ quote . shippingMethod ( ) [ 'carrier_code' ] + '_' + quote . shippingMethod ( ) [ 'method_code' ] :
264
+ null ;
261
265
} ) ,
262
266
263
267
/**
You can’t perform that action at this time.
0 commit comments