Skip to content

Commit

Permalink
fix #318
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Dec 10, 2017
1 parent e1ffbae commit 4024915
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions modules/es6.promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,7 @@ var onUnhandled = function (promise) {
});
};
var isUnhandled = function (promise) {
if (promise._h == 1) return false;
var chain = promise._a || promise._c;
var i = 0;
var reaction;
while (chain.length > i) {
reaction = chain[i++];
if (reaction.fail || !isUnhandled(reaction.promise)) return false;
} return true;
return promise._h !== 1 && (promise._a || promise._c).length === 0;
};
var onHandleUnhandled = function (promise) {
task.call(global, function () {
Expand Down

0 comments on commit 4024915

Please sign in to comment.