Skip to content

Commit 3671a65

Browse files
committed
AC-2619:Persistent cart contents empty until new product added to cart changed implementation fixed static test failure
1 parent 1c2956f commit 3671a65

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/code/Magento/Persistent/view/frontend/web/js/view/customer-data-mixin.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ define([
4646
* @constructor
4747
*/
4848
'Magento_Customer/js/customer-data': function (originFn,invalidateOptions) {
49-
let date;
49+
let date,
50+
storage = $.initNamespaceStorage('mage-cache-storage').localStorage;
5051

51-
let storage = $.initNamespaceStorage('mage-cache-storage').localStorage;
52-
5352
if (new Date($.localStorage.get('mage-cache-timeout')) < new Date()) {
5453
storage.removeAll();
5554
this.reload(['persistent','cart'],true);

0 commit comments

Comments
 (0)