diff --git a/modules/es6.promise.js b/modules/es6.promise.js index 4315f6faaeee..88bf65d4c881 100644 --- a/modules/es6.promise.js +++ b/modules/es6.promise.js @@ -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 () {