Add to cart button not working on dawn theme "window.getCurrentSellingPlanId is not a function"

Hi, I’m pretty new to Shopify, and trying to get my head around this issue.

I am currently making a website on the dawn theme, and my featured products elements with add to cart buttons do not work. When I click on them it just shows the spinning icon. Further investigation on the console shows that the window.getCurrentSellingPlanId is not a function. I went to the code pages for that particular error and it indeed does not have a function with that name to call upon. I’ve tried making a new website but eventually the same issue comes up.

If anyone has any ideas that would be great. In the meantime I will start slowly revert the website to see what has triggered it.

If you would like a play:

pass: sssproduce

Thanks!

As a quick update, the product page add-to-cart button does work; however, I would like to have an add-to-cart button on the home page with the featured collection element.

solved!, deleted these lines of code in the product-form.js page.,