Index: src/promise.js |
diff --git a/src/promise.js b/src/promise.js |
index 7d5be882f4c1ad161f2816ad70badeef614bcb40..d38cdaa482487e84aaf65f1b021bb457bf48a319 100644 |
--- a/src/promise.js |
+++ b/src/promise.js |
@@ -74,7 +74,8 @@ var lastMicrotaskId = 0; |
function PromiseDone(promise, status, value, promiseQueue) { |
if (GET_PRIVATE(promise, promiseStatus) === 0) { |
- PromiseEnqueue(value, GET_PRIVATE(promise, promiseQueue), status); |
+ var tasks = GET_PRIVATE(promise, promiseQueue); |
+ if (tasks.length) PromiseEnqueue(value, tasks, status); |
PromiseSet(promise, status, value); |
} |
} |