After click button ADD TO CART , it's error Cannot read properties of undefined (reading 'remove')
1 Answer
It seems Magento Bug https://github.com/magento/magento2/issues/31920
Please update this fix in your customer-data.js file https://github.com/magento/magento2/commit/5983e1733d56b1b2f15fb4f0e64094a3a4f3145d
Override customer-data.js by copying vendor/magento/module-csutomer/view/frontend/web/js/customer-data.js to your theme app/design/frontend/VendorName/Themename/Magento_Customer/web/js/customer-data.js
Then update the Magento's github commits
Just remove the "remove" function and add the "initstorage" function
initStorage: function () {
$.cookieStorage.setConf({
path: '/',
expires: new Date(Date.now() + parseInt(options.cookieLifeTime, 10) * 1000)
});
storage = $.initNamespaceStorage('mage-cache-storage').localStorage;
storageInvalidation = $.initNamespaceStorage('mage-cache-storage-section-invalidation').localStorage;
},
Note: You are using Welpixel Custom module that already overrides the customer-data.js You can update the customer-data.js by adding it here app/design/frontend/VendorName/Themename/Weltpixel_Custom/web/js/customer-data.js