Skip to content

Commit 1db3772

Browse files
ExE-Bossdanielleadams
authored andcommittedJan 12, 2021
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

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)