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

return null for first, last, nth on error #536

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sooda
Copy link

@sooda sooda commented Jul 22, 2020

Instead of empty string, return null value that's considered undefined
(and can be piped to the default filter) if the array is empty for the
filters first, last and nth. For nth, also change the out-of-bounds
value from empty string to null.

Closes #534, and is a breaking change.

@Keats
Copy link
Owner

Keats commented Jul 23, 2020

Thanks!

Instead of empty string, return null value that's considered undefined
(and can be piped to the default filter) if the array is empty for the
filters first, last and nth. For nth, also change the out-of-bounds
value from empty string to null.

Closes Keats#534, and is a breaking change.
@sooda
Copy link
Author

sooda commented Aug 11, 2020

(Found some related uncommitted changes on documentation, so force-pushed a new revision not to forget them.)

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

Successfully merging this pull request may close these issues.

Empty string for empty array is inconsistent with Jinja2
2 participants