We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b96a3fd commit 6496d01Copy full SHA for 6496d01
docs/object.md
@@ -559,6 +559,7 @@ const DEFAULTS = {
559
560
function processContent(options) {
561
options = Object.assign({}, DEFAULTS, options);
562
+ console.log(options);
563
// ...
564
}
565
```
@@ -576,6 +577,9 @@ const DEFAULTS = {
576
577
};
578
579
processContent({ url: {port: 8000} })
580
+// {
581
+// url: {port: 8000}
582
+// }
583
584
585
上面代码中,原意是将`url.port`改成8000,`url.host`不变。实际结果却是`options.url`覆盖掉`DEFAULTS.url`,`url.host`不存在了。
0 commit comments