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 <apapirovski@mac.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
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)