@@ -87,16 +87,9 @@ define([
87
87
} : [ ] ;
88
88
parameters [ 'update_section_id' ] = updateSectionId ;
89
89
90
- return $ . getJSON ( options . sectionLoadUrl , parameters )
91
- . done (
92
- function ( ) {
93
- if ( _ . isEmpty ( sectionNames ) ) {
94
- customerData . set ( 'is_loading' , false ) ;
95
- }
96
- }
97
- ) . fail ( function ( jqXHR ) {
98
- throw new Error ( jqXHR ) ;
99
- } ) ;
90
+ return $ . getJSON ( options . sectionLoadUrl , parameters ) . fail ( function ( jqXHR ) {
91
+ throw new Error ( jqXHR ) ;
92
+ } ) ;
100
93
}
101
94
} ;
102
95
@@ -216,15 +209,15 @@ define([
216
209
$ . cookieStorage . set ( privateContentVersion , needVersion ) ;
217
210
$ . localStorage . set ( privateContentVersion , needVersion ) ;
218
211
this . reload ( [ ] , false ) ;
219
- this . set ( 'is_loading' , true ) ;
212
+ isLoading = true ;
220
213
} else if ( localPrivateContent !== privateContent ) {
221
214
if ( ! $ . cookieStorage . isSet ( privateContentVersion ) ) {
222
215
privateContent = needVersion ;
223
216
$ . cookieStorage . set ( privateContentVersion , privateContent ) ;
224
217
}
225
218
$ . localStorage . set ( privateContentVersion , privateContent ) ;
226
219
this . reload ( [ ] , false ) ;
227
- this . set ( 'is_loading' , true ) ;
220
+ isLoading = true ;
228
221
} else if ( expiredSectionNames . length > 0 ) {
229
222
_ . each ( dataProvider . getFromStorage ( storage . keys ( ) ) , function ( sectionData , sectionName ) {
230
223
buffer . notify ( sectionName , sectionData ) ;
@@ -242,7 +235,6 @@ define([
242
235
243
236
if ( ! _ . isEmpty ( privateContent ) ) {
244
237
countryData = this . get ( 'directory-data' ) ;
245
- isLoading = this . get ( 'is_loading' ) ;
246
238
247
239
if ( _ . isEmpty ( countryData ( ) ) && ! isLoading ) {
248
240
customerData . reload ( [ 'directory-data' ] , false ) ;
0 commit comments