Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
fix(zone.js): don't make function declaration in block scope
Browse files Browse the repository at this point in the history
It's breaks JSC =)

Closes #53
Closes #54
  • Loading branch information
caitp committed Mar 2, 2015
1 parent 26a4dc2 commit 229fd8f
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,23 +246,23 @@ Zone.bindPromiseFn = (function() {
return patchThenable(delegate.apply(this, arguments));
};
};
}

function patchThenable(thenable) {
var then = thenable.then;
thenable.then = function () {
var args = Zone.bindArguments(arguments);
var nextThenable = then.apply(thenable, args);
return patchThenable(nextThenable);
};
function patchThenable(thenable) {
var then = thenable.then;
thenable.then = function () {
var args = Zone.bindArguments(arguments);
var nextThenable = then.apply(thenable, args);
return patchThenable(nextThenable);
};

var ocatch = thenable.catch;
thenable.catch = function () {
var args = Zone.bindArguments(arguments);
var nextThenable = ocatch.apply(thenable, args);
return patchThenable(nextThenable);
};
return thenable;
}
var ocatch = thenable.catch;
thenable.catch = function () {
var args = Zone.bindArguments(arguments);
var nextThenable = ocatch.apply(thenable, args);
return patchThenable(nextThenable);
};
return thenable;
}
}());

Expand Down

0 comments on commit 229fd8f

Please sign in to comment.