Skip to content

Commit 715baf8

Browse files
mithunsasidharanMylesBorins
authored andcommitted
fs: use rest param & Reflect.apply in makeCallback
PR-URL: #17486 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benedikt Meurer <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
1 parent f399667 commit 715baf8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/fs.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ function makeCallback(cb) {
145145
throw new errors.TypeError('ERR_INVALID_CALLBACK');
146146
}
147147

148-
return function() {
149-
return cb.apply(undefined, arguments);
148+
return function(...args) {
149+
return Reflect.apply(cb, undefined, args);
150150
};
151151
}
152152

0 commit comments

Comments
 (0)