-
Notifications
You must be signed in to change notification settings - Fork 293
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
index outside the array bounds for nth
filter
#650
Comments
It gives an error because only positive integers are allowed and we're trying to cast |
That I understand. But may be we should return empty string This makes it consistent with the case of So that, |
I'm wondering if this behaviour of returning the empty string should be removed entirely in Tera v2. |
Instead throw an error like "Out of bounds"? +1 to that! |
yes, although probably with some kind of |
What should happen if the index falls outside the array bounds?
At present,
nth(n=-1)
gives error whilenth(n=100)
gives empty string (for array having length < 100). This is inconsistent behavior.The text was updated successfully, but these errors were encountered: