File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
app/code/Magento/Checkout/view/frontend/web/js Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,7 @@ define([
164
164
165
165
// Populate state/province dropdown list if available or use input box
166
166
if ( this . options . regionJson [ country ] ) {
167
+ $ ( regionList ) . find ( 'option:selected' ) . removeAttr ( "selected" ) ;
167
168
this . _removeSelectOptions ( regionList ) ;
168
169
$ . each ( this . options . regionJson [ country ] , $ . proxy ( function ( key , value ) {
169
170
this . _renderSelectOption ( regionList , key , value ) ;
@@ -198,6 +199,7 @@ define([
198
199
regionInput . hide ( ) ;
199
200
label . attr ( 'for' , regionList . attr ( 'id' ) ) ;
200
201
} else {
202
+ regionInput . val ( '' ) ;
201
203
this . _removeSelectOptions ( regionList ) ;
202
204
203
205
if ( this . options . isRegionRequired ) {
@@ -224,13 +226,7 @@ define([
224
226
postcode . addClass ( 'required-entry' ) . closest ( '.field' ) . addClass ( 'required' ) ;
225
227
}
226
228
227
- if ( ! this . options . defaultRegion ) {
228
- regionList . val ( '' ) ;
229
- regionInput . val ( '' ) ;
230
- } else {
231
- // Add defaultvalue attribute to state/province select element
232
- regionList . attr ( 'defaultvalue' , this . options . defaultRegion ) ;
233
- }
229
+ regionList . attr ( 'defaultvalue' , this . options . defaultRegion ) ;
234
230
} ,
235
231
236
232
/**
You can’t perform that action at this time.
0 commit comments