theme-check icon indicating copy to clipboard operation
theme-check copied to clipboard

Add check for nested liquid loops

Open darryn opened this issue 3 years ago • 1 comments

There are instances where there are multiple liquid loops nested inside each other. These can clog the TTR.

Here is a bad example...

  {% for product in collection.products %}
    {% for tag in product.tags %}
      {% for variant in product.variants %}
        {% for collection in product.collections %}
        
        {% endfor %}
      {% endfor %}
    {% endfor %}
  {% endfor %}

Semi-related to the nested snippets logic.

darryn avatar Jul 01 '21 02:07 darryn

Oh this is good Darryn! Thanks for the suggestion.

macournoyer avatar Jul 05 '21 12:07 macournoyer