You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using reverse matching operator ! along with nested search, items with matched fields that have nullish values (undefined, null or "") are completely discarded from the results. I think that a reverse match operator should match nullish values too. "", null and undefinedshould match !somestring! Is there a workaround for this that I am missing?
The Fuse.js version where this bug is happening.
6.6.2
Is this a regression?
This is a regression bug
Which version did this behavior use to work in?
None
Steps To Reproduce
We try to match every item whose lastName field doesn't include the string doe
asnaeb
changed the title
Reverse match returns no result when matched fields are nullish
Inverse match returns no result when matched fields are nullish
Nov 14, 2023
This will return the unicode non-character FFFF as a fallback for nullish values, preventing them to be excluded from the result set. This character is very unlikely to be typed inside a search string so it is working fine for me at the moment but still it would be nice to see this fixed. I was even thinking of making a PR but based on what I've seen it looks like external PR's and issues get very little consideration these times so I'm not really motivated in doing one which could potentially remain ignored. (This doesn't mean to be a critique to the author)
I am facing this issue as well but the suggested workaround does not work in my case. I believe that this is due to searching in a nested property where the parent is undefined. I am using a fork so I could fix it locally, can you @asnaeb give any hints on what causes the issue? Thanks!
Is there an existing issue for this?
Description of the bug
When using reverse matching operator
!
along with nested search, items with matched fields that have nullish values (undefined
,null
or""
) are completely discarded from the results. I think that a reverse match operator should match nullish values too.""
,null
andundefined
should match!somestring
! Is there a workaround for this that I am missing?The Fuse.js version where this bug is happening.
6.6.2
Is this a regression?
Which version did this behavior use to work in?
None
Steps To Reproduce
We try to match every item whose
lastName
field doesn't include the stringdoe
Result is empty, but none of the three items actually have a
lastName
field which includesdoe
.Expected behavior
The text was updated successfully, but these errors were encountered: