How to prevent infinite background process in shopify once changed cart status

I built a js script to add cart on theme, but once I added cart, app is broken to work. This code in template section of liquid. await fetch(window.Shopify.routes.root + 'cart/add.js', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(formData) }) .then(response => { return response.json(); }) .catch((error) => { console.error('Error:', error); return false; }); Adding cart feature is working well, but once it has been done, Shopify site is broken and when I checked on windows task manager, memory consumpsion is increasing more and more with time. If anyone experienced in such issue, please leave comments. Thank you very much.

Comment (0)

You’ll be in good company