Skip to content

Commit 17a5f24

Browse files
authored
Remove redundant object from Object.assign example
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.
1 parent d00ca4c commit 17a5f24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ var menuConfig = {
483483
}
484484

485485
function createMenu(config) {
486-
config = Object.assign({}, {
486+
config = Object.assign({
487487
title: 'Foo',
488488
body: 'Bar',
489489
buttonText: 'Baz',

0 commit comments

Comments
 (0)