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(collections): prevent cycles in deepMerge() #2228

Merged
merged 1 commit into from
May 14, 2022

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented May 13, 2022

This commit adds logic to deepMerge() to prevent infinite looping over cyclic data structures. The algorithm will now bail out before calling mergeObjects() if either object has already been processed.

Fixes: #2134

This commit adds logic to deepMerge() to prevent infinite
looping over cyclic data structures. The algorithm will now
bail out before calling mergeObjects() if either object has
already been processed.

Fixes: denoland#2134
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cjihrig cjihrig merged commit 19fc723 into denoland:main May 14, 2022
@cjihrig cjihrig deleted the cycles branch May 14, 2022 15:39
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.

recursive functions need to be checked for circular references
2 participants