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

Fix the find filter to return nil when filtering empty arrays #1902

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

karreiro
Copy link
Contributor

This PR is a patch that addresses an issue in the find filter introduced by #1869.

When filtering an empty array, the find filter should return nil, just as it returns the found element when it locates the desired element or nil when the element cannot be found. However, it was incorrectly returning an empty array.

@karreiro karreiro requested a review from a team January 23, 2025 10:11
Copy link

@frandiox frandiox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good 👍 -- What about find_index, though?

@karreiro
Copy link
Contributor Author

Thanks a lot for the review, @frandiox! I've applied the fixes for find_index and has as well :)

@karreiro karreiro merged commit bf1419b into main Jan 24, 2025
13 checks passed
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.

4 participants