fs: remove unused argument from copyObject() · nodejs/node@2673be6 · GitHub
Skip to content

Commit 2673be6

Browse files
Ethan-ArrowoodMylesBorins
authored andcommitted
fs: remove unused argument from copyObject()
The fs function copyObject() had two arguments: source and target. On the first line of the function it assigned the target variable to: arguments.length >= 2 ? target : {}; The function copyObject() was not called directly by any test, but it is called in other fs functions. When it was called it was only ever called with a single argument, source. Thus I have removed the target argument and assigned it to an empty object like it was being assigned to in the original ternary operator. PR-URL: #10041 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 2da71f2 commit 2673be6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/fs.js

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)