Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7cc1f0d

Browse files
ExE-Bosstargos
authored andcommittedMay 25, 2021
lib: simplify primordials.uncurryThis
PR-URL: #36866 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Pooja D P <[email protected]>
1 parent 647e65c commit 7cc1f0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎lib/internal/per_context/primordials.js

+3-3
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)
Please sign in to comment.