diff --git a/lib/internal/process/task_queues.js b/lib/internal/process/task_queues.js index 2a14b9dea68080..2c53b21040e5d8 100644 --- a/lib/internal/process/task_queues.js +++ b/lib/internal/process/task_queues.js @@ -68,7 +68,7 @@ function runNextTicks() { function processTicksAndRejections() { let tock; do { - while (tock = queue.shift()) { + while ((tock = queue.shift()) !== null) { const asyncId = tock[async_id_symbol]; emitBefore(asyncId, tock[trigger_async_id_symbol], tock);