Exception thrown when filtering collection that contains null values #100
Replies: 2 comments 1 reply
-
Hi @austin-best, What is your expected behavior? asking because you can add a null check if you want, for example these filters works correctly:
I had an idea before to add a null safe search settings that always checks for null values before creating actual expressions but since so far no one asked for it It doesn't exist. please let me know what you think |
Beta Was this translation helpful? Give feedback.
-
Hi, @alirezanet - I would have expected nulls to have been handled as falsey for any operator except |
Beta Was this translation helpful? Give feedback.
-
Version
2.8.3
Details
Trying to filter on a collection of data where the property that I'm filtering on might contain null values.
A NullReferenceException is thrown if any of the values that I'm filtering on are null.
Steps to reproduce
Minimal reproducible example:
Filters that throw an exception:
[email protected]
[email protected]/i
(notice, this is case insensitive)Mail=*com
Filters that do not throw an exception:
Mail=
Mail!=
[email protected]
(notice, this is case sensitive)Beta Was this translation helpful? Give feedback.
All reactions