Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 715baf8

Browse filesBrowse 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
Copy full SHA for 715baf8

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎lib/fs.js‎

Copy file name to clipboardExpand all lines: lib/fs.js
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.