Hi all,
I am working on this line of JS in my theme (Impulse), and am a bit stuck on how to properly write it:
delayMessage: product.product_tags.includes(‘Tees’),
Essentially I am looking to define ‘delayMessage’ by the product tag ‘Tees’, however I cannot figure out how to find that specific tag in Javascript using the product object.
I’ve tried the following as well, however can’t seem to get it to work:
delayMessage: product_tags == ‘Tees’,> delayMessage: product.product_tags == “Tees”,> delayMessage: product.tags.includes(‘Tees’),
What would be the correct way to write this? As products normally have multiple tags, do you need to loop through them similar to liquid?