Skip to content

Remove redundant object from Object.assign example#27

Merged
ryanmcdermott merged 1 commit into
ryanmcdermott:masterfrom
connec:patch-1
Jan 6, 2017
Merged

Remove redundant object from Object.assign example#27
ryanmcdermott merged 1 commit into
ryanmcdermott:masterfrom
connec:patch-1

Conversation

@connec
Copy link
Copy Markdown
Contributor

@connec connec commented Jan 5, 2017

In the "good" Object.assign example, the initial new object is redundant as the defaults are also specified in a new object.

This is a bit pedantic, and doesn't change the semantics of the example, just removes an unnecessary object creation.

Note: I definitely wouldn't have bothered with this if I didn't make #4, and was looking at it anyway 😄

In the "good" `Object.assign` example, the initial new object is redundant as the defaults are also specified in a new object.

This is a bit pedantic, and doesn't change the semantics of the example, just removes an unnecessary object creation.
@ryanmcdermott ryanmcdermott merged commit 11b7271 into ryanmcdermott:master Jan 6, 2017
@ryanmcdermott
Copy link
Copy Markdown
Owner

Oh cool! I tested this out and it doesn't look like it mutates the original config, which is good. Thanks Chris!

@connec connec deleted the patch-1 branch January 6, 2017 13:53
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.

2 participants