Skip to content

Upgrade map filter to advanced filter, improve error messages, and pass through args for filters#356

Merged
mattcoley merged 5 commits into
masterfrom
improve-map
Aug 1, 2019
Merged

Upgrade map filter to advanced filter, improve error messages, and pass through args for filters#356
mattcoley merged 5 commits into
masterfrom
improve-map

Conversation

@mattcoley

@mattcoley mattcoley commented Jul 30, 2019

Copy link
Copy Markdown
Collaborator

The |map filter supports two usages: mapping to an attribute and mapping to a filter. Since |map was a regular filter, it could not use the attribute= arg to specify if the argument is an attribute and not a filter if there was ambiguity between the two. This upgrades the map filter to an advanced filter and improves on error messaging by preventing NPEs from surfacing if a null value is passed into the filter.

The docs also say Alternatively you can let it invoke a filter by passing the name of the filter and the arguments afterwards which was not true until I added the passthrough of the additional arguments.

@mattcoley mattcoley requested a review from boulter July 30, 2019 20:19
@mattcoley mattcoley changed the title Upgrade map filter to advanced filter and improve error messages. Upgrade map filter to advanced filter, improve error messages, and pass through args for filters Jul 30, 2019
@mattcoley mattcoley merged commit 0074889 into master Aug 1, 2019
@mattcoley mattcoley deleted the improve-map branch August 1, 2019 13:51
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