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 1db3772

Browse filesBrowse files
ExE-Bossdanielleadams
authored andcommitted
lib: simplify primordials.uncurryThis
PR-URL: #36866 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Pooja D P <Pooja.D.P@ibm.com>
1 parent 01213c7 commit 1db3772
Copy full SHA for 1db3772

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎lib/internal/per_context/primordials.js‎

Copy file name to clipboardExpand all lines: lib/internal/per_context/primordials.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
// by the native module compiler.
1414

1515
// `uncurryThis` is equivalent to `func => Function.prototype.call.bind(func)`.
16-
// It is using `call.bind(bind, call)` to avoid using `Function.prototype.bind`
17-
// after it may have been mutated by users.
16+
// It is using `bind.bind(call)` to avoid using `Function.prototype.bind`
17+
// and `Function.prototype.call` after it may have been mutated by users.
1818
const { bind, call } = Function.prototype;
19-
const uncurryThis = call.bind(bind, call);
19+
const uncurryThis = bind.bind(call);
2020
primordials.uncurryThis = uncurryThis;
2121

2222
function copyProps(src, dest) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.