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

Possibly warn about recursive objects #2

Open
nullivex opened this issue Dec 20, 2013 · 0 comments
Open

Possibly warn about recursive objects #2

nullivex opened this issue Dec 20, 2013 · 0 comments

Comments

@nullivex
Copy link

If a recursive object is accidentally passed to this function it will result in the dreaded maximum call stack exceeded error with virtually no debug information.

I have written the following package: https://github.com/snailjs/object-manage that utilizes this tool for merges after testing a few different solutions.

I ended up implemented a depth warning that prints a stack trace before merging a deep object. I dont think its the perfect solution but it at least gives a stack trace that can be used to figure out where the bad object is coming from.

I am wondering if this is something that could be supported here rather than downstream in my package.

I would be will to submit a pull request if there is any interest in this.

Thanks

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

No branches or pull requests

1 participant