Skip to content

Commit

Permalink
fs: refactor to remove redundant validation
Browse files Browse the repository at this point in the history
The function makeCallback already calls validateCallback, so the call
inside copyFile can be removed.

PR-URL: #36984
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
RaisinTen authored and targos committed Feb 2, 2021
1 parent 56377d6 commit 97fc7d8
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2036,8 +2036,6 @@ function copyFile(src, dest, mode, callback) {
if (typeof mode === 'function') {
callback = mode;
mode = 0;
} else {
validateCallback(callback);
}

src = getValidatedPath(src, 'src');
Expand Down

0 comments on commit 97fc7d8

Please sign in to comment.