Liquid code not rendering in div when if is used

There are no products shown, while the javascript code is run. When removing the if tag all the products are shown so why isn’t it working?


        

          	{% for product in all_the_products %}
          		{% if tags contains product.handle %}
          			  <----- This runs perfectly containing the right products inside the console
          			
 <--- This does not get rendered even though the products are passed trough
                      {%
                        render 'framework--product--item',
                        product: product,
                        view: 'grid'
                      %}
                    

          		{% endif %}
          	{% endfor %}
        

       

When removing the if tag the code runs like expected and the website looks like this:

So there is not a problem with the product object. What could it be?

Can you remove those HTML comments and try this again.

<-----

You have opened comments but never closed… at least from the snippet you’ve added

That’s an arrow to point at the place it’s working :slightly_smiling_face: