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

resolveObject is mutating the properties object #111

Closed
dbanksdesign opened this issue Jul 31, 2018 · 0 comments
Closed

resolveObject is mutating the properties object #111

dbanksdesign opened this issue Jul 31, 2018 · 0 comments

Comments

@dbanksdesign
Copy link
Member

This is the offending line:
https://github.com/amzn/style-dictionary/blob/master/lib/utils/resolveObject.js#L29

_.clone() is only a shallow copy, so when resolveObject is called it mutates the original properties object. This can have dire consequences because that means the properties object could change from platform to platform.

Fix: change to _.cloneDeep

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