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

Double chaining leads to a stack overflow #2853

Open
jgonggrijp opened this issue Jun 2, 2020 · 0 comments
Open

Double chaining leads to a stack overflow #2853

jgonggrijp opened this issue Jun 2, 2020 · 0 comments
Labels
starter good choice for new contributors

Comments

@jgonggrijp
Copy link
Collaborator

The following expression is useless, since you'd expect the second chain call to just return a new wrapper of the same value:

_.chain([1]).chain()

but rather than behaving like a no-op, it results in a stack overflow. Credits to @reubenrybnik for pointing this out in DefinitelyTyped/DefinitelyTyped#45201 (comment). This minor pitfall might have been introduced with #1691.

I'm hesitant to give this a "bug" label as it is rather non-urgent, but technically it's a bug. Documenting in an issue ticket for reference.

@jgonggrijp jgonggrijp added the starter good choice for new contributors label Oct 11, 2020
@jgonggrijp jgonggrijp linked a pull request Aug 31, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
starter good choice for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant