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

Calling .extend multiple times does not properly deep merge #274

Closed
dbanksdesign opened this issue May 19, 2019 · 0 comments
Closed

Calling .extend multiple times does not properly deep merge #274

dbanksdesign opened this issue May 19, 2019 · 0 comments

Comments

@dbanksdesign
Copy link
Member

Test case:

var StyleDictionary1 = StyleDictionary.extend({
  foo: 'bar'
});
var StyleDictionary2 = StyleDictionary1.extend({
  foo: 'baz'
});
// StyleDictionary2.foo should be 'baz', but it is 'bar' right now

The extend method was meant to allow for modifying the core library so you could add transforms and formats and export a new StyleDictionary object for others to consume.

Problem line: https://github.com/amzn/style-dictionary/blob/master/lib/extend.js#L99

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