Add to cart is not working and getting error:
section-config.js:33 Uncaught TypeError: Cannot read property '*' of undefined
I am very new to magento and by following docs, I have created a custom theme overriding the default LUMA theme.
And when i try to add a product to cart it shows Adding.. and loader keeps spinning.
I get following error in the console:
Uncaught TypeError: Cannot read property '*' of undefined
at Object.getAffectedSections (section-config.js:33)
at HTMLDocument.<anonymous> (customer-data.js:218)
at HTMLDocument.dispatch (jquery.js:5226)
at HTMLDocument.elemData.handle (jquery.js:4878)
at Object.trigger (jquery.js:5130)
at Object.jQuery.event.trigger (jquery-migrate.js:493)
at done (jquery.js:9858)
at XMLHttpRequest.callback (jquery.js:10311)
I tried flushing cache, deleting everything inside var folder and also changed url from http://localhost/dir-name to http://127.0.0.1/dir-name but no luck!