Skip to content

Commit a995cc4

Browse files
authored
Mistake in the Set default objects with Object.assign
In the Bad section, shouldn't it be config.cancellable !== undefined?
1 parent 2ff9c4f commit a995cc4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# clean-code-javascript
32

43
## Table of Contents
@@ -474,7 +473,7 @@ function createMenu(config) {
474473
config.title = config.title || 'Foo';
475474
config.body = config.body || 'Bar';
476475
config.buttonText = config.buttonText || 'Baz';
477-
config.cancellable = config.cancellable === undefined ? config.cancellable : true;
476+
config.cancellable = config.cancellable !== undefined ? config.cancellable : true;
478477
}
479478

480479
createMenu(menuConfig);

0 commit comments

Comments
 (0)