From a89ce1eb9ff6f985ce52b483d1c88d5b286230d9 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 12 Feb 2014 05:07:55 -0500 Subject: [PATCH] fix(util) retExec: add unshift --- lib/util.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/util.js b/lib/util.js index b73c2ced..c206ac62 100644 --- a/lib/util.js +++ b/lib/util.js @@ -723,9 +723,11 @@ */ this.retExec = function() { var result, - exec = Util.exec.bind(Util); + exec = Util.exec.bind(Util), + args = Util.slice(arguments); - result = Util.bind.apply(exec, arguments); + args.unshift(exec); + result = Util.bind.apply(null, args); return result; };