Skip to content

Commit 1db3772

Browse files
ExE-Bossdanielleadams
authored andcommitted
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 01213c7 commit 1db3772

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)