@@ -199,7 +199,8 @@ define([
199
199
privateContent = $ . cookieStorage . get ( privateContentVersion ) ,
200
200
localPrivateContent = $ . localStorage . get ( privateContentVersion ) ,
201
201
needVersion = 'need_version' ,
202
- expiredSectionNames = this . getExpiredSectionNames ( ) ;
202
+ expiredSectionNames = this . getExpiredSectionNames ( ) ,
203
+ isLoading = false ;
203
204
204
205
if ( privateContent &&
205
206
! $ . cookieStorage . isSet ( privateContentVersion ) &&
@@ -208,13 +209,15 @@ define([
208
209
$ . cookieStorage . set ( privateContentVersion , needVersion ) ;
209
210
$ . localStorage . set ( privateContentVersion , needVersion ) ;
210
211
this . reload ( [ ] , false ) ;
212
+ isLoading = true ;
211
213
} else if ( localPrivateContent !== privateContent ) {
212
214
if ( ! $ . cookieStorage . isSet ( privateContentVersion ) ) {
213
215
privateContent = needVersion ;
214
216
$ . cookieStorage . set ( privateContentVersion , privateContent ) ;
215
217
}
216
218
$ . localStorage . set ( privateContentVersion , privateContent ) ;
217
219
this . reload ( [ ] , false ) ;
220
+ isLoading = true ;
218
221
} else if ( expiredSectionNames . length > 0 ) {
219
222
_ . each ( dataProvider . getFromStorage ( storage . keys ( ) ) , function ( sectionData , sectionName ) {
220
223
buffer . notify ( sectionName , sectionData ) ;
@@ -233,7 +236,7 @@ define([
233
236
if ( ! _ . isEmpty ( privateContent ) ) {
234
237
countryData = this . get ( 'directory-data' ) ;
235
238
236
- if ( _ . isEmpty ( countryData ( ) ) ) {
239
+ if ( _ . isEmpty ( countryData ( ) ) && ! isLoading ) {
237
240
customerData . reload ( [ 'directory-data' ] , false ) ;
238
241
}
239
242
}
0 commit comments