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 is.nonEmptyArray() type narrowing with undefined #188

Merged
merged 1 commit into from
Jul 17, 2023
Merged

Fix is.nonEmptyArray() type narrowing with undefined #188

merged 1 commit into from
Jul 17, 2023

Conversation

eugene-mohc
Copy link
Contributor

Unfortunately the fix in #185 doesn't work correctly with undefined values.

There seems to be no need for the conditional, and this produces the same behavior as the normal is.array() type guard.

@eugene-mohc eugene-mohc changed the title Fix non empty array type narrowing with undefined Fix is.nonEmptyArray() type narrowing with undefined Jul 17, 2023
@sindresorhus sindresorhus merged commit 20ad823 into sindresorhus:main Jul 17, 2023
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