Skip to content

Commit

Permalink
Fix conflict due to fn being overriden
Browse files Browse the repository at this point in the history
  • Loading branch information
maximethebault committed Aug 29, 2013
1 parent 71d45c8 commit 90acfe9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions synchronized-bind.js
Expand Up @@ -116,14 +116,17 @@ module.exports.fn = function(scopeObj, fn) {
var newFn = fn,
newArguments = Array.prototype.slice.call(arguments, 0, arguments.length - 1);

fn = function(callback){
var fnPassed = function(callback){
newArguments.push(callback);

newFn.apply(self, newArguments);
};
}
else {
var fnPassed = fn;
}

synchd.call(self, scopeObj, fn, done);
synchd.call(self, scopeObj, fnPassed, done);
};
}

Expand Down

0 comments on commit 90acfe9

Please sign in to comment.