diff --git a/lib/fs.js b/lib/fs.js index 27614e5cf1febc..12ba9b8dba790f 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -56,8 +56,8 @@ function getOptions(options, defaultOptions) { return options; } -function copyObject(source, target) { - target = arguments.length >= 2 ? target : {}; +function copyObject(source) { + const target = {}; for (const key in source) target[key] = source[key]; return target;