File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
app/code/Magento/Customer/view/frontend/web/js Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,6 @@ define([
30
30
url . setBaseUrl ( window . BASE_URL ) ;
31
31
options . sectionLoadUrl = url . build ( 'customer/section/load' ) ;
32
32
33
- storage = $ . initNamespaceStorage ( 'mage-cache-storage' ) . localStorage ;
34
- storageInvalidation = $ . initNamespaceStorage ( 'mage-cache-storage-section-invalidation' ) . localStorage ;
35
-
36
33
/**
37
34
* @param {Object } invalidateOptions
38
35
*/
@@ -214,11 +211,18 @@ define([
214
211
this . reload ( sectionConfig . getSectionNames ( ) , true ) ;
215
212
$ . cookieStorage . set ( 'section_data_clean' , '' ) ;
216
213
}
214
+ } ,
217
215
216
+ /**
217
+ * Storage init
218
+ */
219
+ initStorage : function ( ) {
218
220
$ . cookieStorage . setConf ( {
219
221
path : '/' ,
220
222
expires : new Date ( Date . now ( ) + parseInt ( options . cookieLifeTime , 10 ) * 1000 )
221
223
} ) ;
224
+ storage = $ . initNamespaceStorage ( 'mage-cache-storage' ) . localStorage ;
225
+ storageInvalidation = $ . initNamespaceStorage ( 'mage-cache-storage-section-invalidation' ) . localStorage ;
222
226
} ,
223
227
224
228
/**
@@ -356,6 +360,7 @@ define([
356
360
*/
357
361
'Magento_Customer/js/customer-data' : function ( settings ) {
358
362
options = settings ;
363
+ customerData . initStorage ( ) ;
359
364
invalidateCacheBySessionTimeOut ( settings ) ;
360
365
invalidateCacheByCloseCookieSession ( ) ;
361
366
customerData . init ( ) ;
You can’t perform that action at this time.
0 commit comments