From 6eaf357f4900448a8d166f20d7c8af9ed62be767 Mon Sep 17 00:00:00 2001 From: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Date: Sun, 10 Jan 2021 13:15:00 +0100 Subject: [PATCH] =?UTF-8?q?lib:=20simplify=C2=A0`primordials.uncurryThis`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/36866 Reviewed-By: Anna Henningsen Reviewed-By: Antoine du Hamel Reviewed-By: James M Snell Reviewed-By: Pooja D P --- lib/internal/per_context/primordials.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/internal/per_context/primordials.js b/lib/internal/per_context/primordials.js index 2a3cfad5d07a57..756c774d8b6379 100644 --- a/lib/internal/per_context/primordials.js +++ b/lib/internal/per_context/primordials.js @@ -13,10 +13,10 @@ // by the native module compiler. // `uncurryThis` is equivalent to `func => Function.prototype.call.bind(func)`. -// It is using `call.bind(bind, call)` to avoid using `Function.prototype.bind` -// after it may have been mutated by users. +// It is using `bind.bind(call)` to avoid using `Function.prototype.bind` +// and `Function.prototype.call` after it may have been mutated by users. const { bind, call } = Function.prototype; -const uncurryThis = call.bind(bind, call); +const uncurryThis = bind.bind(call); primordials.uncurryThis = uncurryThis; function copyProps(src, dest) {