mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
process: handle rejections only when needed
Signed-off-by: Gürgün Dayıoğlu <hey@gurgun.day> PR-URL: https://github.com/nodejs/node/pull/62919 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com>
This commit is contained in:
1 parent
0f684239c7
commit
44f9fc3643
1 file changed
+2
-1
@@ -102,7 +102,8 @@ function processTicksAndRejections() {
|
||||
AsyncContextFrame.set(priorContextFrame);
|
||||
}
|
||||
runMicrotasks();
|
||||
} while (!queue.isEmpty() || processPromiseRejections());
|
||||
} while (!queue.isEmpty() ||
|
||||
(hasRejectionToWarn() && processPromiseRejections()));
|
||||
setHasTickScheduled(false);
|
||||
setHasRejectionToWarn(false);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user