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 isEmpty logic in keepLatest #608

Merged

Conversation

danwenzel
Copy link
Contributor

The logic for calculating isEmpty was incorrect for a few cases.

It needs to return true for:

  • empty arrays
  • objects that are either null or have no keys (was opposite)
  • any other value that is falsey (was opposite. Also accounting for 0 now)

See updated tests for the various cases

The logic for calculating isEmpty was incorrect. 
It needs to return true for:

- empty arrays
- objects that are either null or have no keys (was opposite)
- any other value that is falsey (was opposite. Also accounting for 0 now)

See updated tests for the various cases
@NullVoxPopuli NullVoxPopuli merged commit e852687 into NullVoxPopuli:main Aug 31, 2022
@danwenzel danwenzel deleted the fix-keep-latest-is-empty branch August 31, 2022 21:12
@NullVoxPopuli
Copy link
Owner

thank you!!

@github-actions
Copy link
Contributor

🎉 This PR is included in version 5.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants