From 9ac3eeb332b76d6a842a43889c3423e54a31d612 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 5 Jun 2015 09:28:17 -0400 Subject: [PATCH] feature(util) exec.with: arguments[0] -> slice.call(arguments) --- lib/util.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/util.js b/lib/util.js index 7dd058a6..815f7d19 100644 --- a/lib/util.js +++ b/lib/util.js @@ -273,13 +273,9 @@ */ exec.with = function(callback) { - var result, - bind = Function.bind; + var args = [].slice.call(arguments, 1); - arguments[0] = null; - result = bind.apply(callback, arguments); - - return result; + return callback.bind(null, args); }; /**