product.has_only_default_variant example appears to have an error

8 0 1

In the documentation for the Liquid object "Product", the example either has a little error or is misleading.

Under the product.has_only_default_variant, the example suggests to use a variable called variant and get the id from it but the variant which isn't defined above the code example would necessarily return an empty string

May I suggest to change the value from {{ }} to to {{ }}?

My client was wondering why this wasn't working and it seemed so obvious I couldnt see it for a while until it dawned on me. Just trying to help out the community


{% if product.has_only_default_variant %}
  <input name="id" value="{{ }}" type="hidden">
{% else %}
  <select name="id">
    {% for variant in product.variants %}
      <option value="{{ }}">{{ variant.title }}</option>
    {% endfor%}
{% endif %}