From 280687099c6db253b4c9bff4e25588185f1e0580 Mon Sep 17 00:00:00 2001 From: Andrew Stewart Date: Thu, 18 Dec 2014 13:15:30 -0800 Subject: [PATCH] Revert change to direct method binding, breaks stuff This is Probably Bad and should be revisited in the future. --- lib/utils.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index eec6660..4ebd787 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -219,15 +219,13 @@ var Utils = module.exports = { force = force || false; _.forEach(methods, function(method) { - if (!_.isFunction(target[method])) { - return; - } - if (_.isFunction(base[method]) && !force) { return; } - base[method] = target[method].bind(target); + base[method] = function() { + return target[method].apply(target, arguments); + }; }); return base;