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

flatten with depth=1 is not properly applied to the first element #564

Open
bd82 opened this issue Jul 1, 2023 · 1 comment · May be fixed by #577
Open

flatten with depth=1 is not properly applied to the first element #564

bd82 opened this issue Jul 1, 2023 · 1 comment · May be fixed by #577

Comments

@bd82
Copy link

bd82 commented Jul 1, 2023

image

Expected result would be [1, 2, 3]
But the actual is [[1], 2, 3]

Code snippet:

const flatten = require('just-flatten-it')

flatten([[1], [2], 3], 1);
@superhit0
Copy link

@angus-c I opened a PR for the fix, please let me know your thoughts on this - #577

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 a pull request may close this issue.

2 participants