diff --git a/lib/fs.js b/lib/fs.js index a53290274c331e..eb781b0add8588 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -145,8 +145,8 @@ function makeCallback(cb) { throw new errors.TypeError('ERR_INVALID_CALLBACK'); } - return function() { - return cb.apply(undefined, arguments); + return function(...args) { + return Reflect.apply(cb, undefined, args); }; }