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

Avoid copying non-enumerable and/or symbol keys in cloneDeep. #4052

Merged
merged 1 commit into from
Oct 24, 2018

Conversation

benjamn
Copy link
Member

@benjamn benjamn commented Oct 24, 2018

#4039 (comment)

The previous fclone implementation did not preserve non-enumerable or non-string keys either (see here), so this is not a breaking change.

The Date case was also a bit overzealous, since there are no actual use cases in this codebase that require Date objects to be duplicated, rather than simply passing them through.

If we're missing any cases that anyone cares about, we can easily expand the switch-case coverage in the future.

#4039 (comment)

The previous fclone implementation didn't bother with non-enumerable or
non-string keys, either, so this is not a breaking change.

The Date case was also a bit overzealous, since there are no actual use
cases in this codebase that require Date objects to be duplicated, rather
than simply passing them through.

If we're missing any cases that anyone cares about, we can easily expand
the switch-case coverage in the future.
@benjamn benjamn self-assigned this Oct 24, 2018
@benjamn benjamn merged commit 5874bec into master Oct 24, 2018
@benjamn benjamn deleted the simplify-cloneDeep branch October 24, 2018 19:24
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant