Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tablerow drop's last attribute with missing cols param #1633

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

ggmichaelgo
Copy link
Contributor

@ggmichaelgo ggmichaelgo commented Oct 3, 2022

When cols param is missing from the tablerow tag, tablerowloop#col_last always returns false.

Liquid template:

{% tablerow i in (1..2) %}
  {{ tablerowloop.col_last }}
{% endtablerow %}

Expected output:

<tr class="row1">
<td class="col1">
false
</td><td class="col2">
true
</td></tr>

Current output:

<tr class="row1">
<td class="col1">
false
</td><td class="col2">
false
</td></tr>

@ggmichaelgo ggmichaelgo force-pushed the fix-tablerow-drop-cols-last-attr branch from 6f8c53e to fbab19a Compare October 5, 2022 14:15
@ggmichaelgo
Copy link
Contributor Author

ping @Shopify/guardians-of-the-liquid

@dylanahsmith
Copy link
Contributor

Your PR descriptions current output is a copy of your expected output. The actual current output is

<tr class="row1">
<td class="col1">
  false
</td><td class="col2">
  false
</td></tr>

which is indeed wrong. Thanks for the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants