Revert change to direct method binding, breaks stuff

This is Probably Bad and should be revisited in the future.
This commit is contained in:
Andrew Stewart 2014-12-18 13:15:30 -08:00
parent 7109a9d303
commit 280687099c
1 changed files with 3 additions and 5 deletions

View File

@ -219,15 +219,13 @@ var Utils = module.exports = {
force = force || false; force = force || false;
_.forEach(methods, function(method) { _.forEach(methods, function(method) {
if (!_.isFunction(target[method])) {
return;
}
if (_.isFunction(base[method]) && !force) { if (_.isFunction(base[method]) && !force) {
return; return;
} }
base[method] = target[method].bind(target); base[method] = function() {
return target[method].apply(target, arguments);
};
}); });
return base; return base;