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([
164164
165165 // Populate state/province dropdown list if available or use input box
166166 if ( this . options . regionJson [ country ] ) {
167+ $ ( regionList ) . find ( 'option:selected' ) . removeAttr ( "selected" ) ;
167168 this . _removeSelectOptions ( regionList ) ;
168169 $ . each ( this . options . regionJson [ country ] , $ . proxy ( function ( key , value ) {
169170 this . _renderSelectOption ( regionList , key , value ) ;
@@ -198,6 +199,7 @@ define([
198199 regionInput . hide ( ) ;
199200 label . attr ( 'for' , regionList . attr ( 'id' ) ) ;
200201 } else {
202+ regionInput . val ( '' ) ;
201203 this . _removeSelectOptions ( regionList ) ;
202204
203205 if ( this . options . isRegionRequired ) {
@@ -224,13 +226,7 @@ define([
224226 postcode . addClass ( 'required-entry' ) . closest ( '.field' ) . addClass ( 'required' ) ;
225227 }
226228
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 ) ;
234230 } ,
235231
236232 /**
You can’t perform that action at this time.
0 commit comments