Hi there,
I’ve come across a strange problem with the Empire theme where the quick-buy buttons on collection pages don’t work any more.
It looks like a JS error, though I have made no changes to that file (or really many changes to the collection page, beyond what is possible with the theme) and all of a sudden I have this error in the console:
Uncaught TypeError: Cannot read properties of undefined (reading 'querySelector')
at new ProductQuickshop (empire.js?v=122564863754450944301654861837:31693:48)
at ProductGridItem._openQuickShop (empire.js?v=122564863754450944301654861837:32276:29)
at HTMLButtonElement.
I assume this reads as 'I cant find that element' but where the error actually originates in the file I find this:
```javascript
this.quickshopSpinner = this.$quickShop[0].querySelector('.quickshop-spinner');
This seems to be an element that the JS creates itself (there are only CSS references to it in the theme, rather than any liquid or html).
I have compared differences in the collection, product-item (the product card) and the JS file but there are no differences in any?
The fresh copy of the theme seems fine and adding any of those files back into the live theme doesnt resolve the issue either! ![]()
Any suggestions?