Skip to content

Commit cf1d3d1

Browse files
TrottBethGriggs
authored andcommitted
process: check for null instead of falsy in while loop
This prepares the code for the no-cond-assign ESLint rule. PR-URL: #41614 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent d83d55e commit cf1d3d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/process/task_queues.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function runNextTicks() {
6868
function processTicksAndRejections() {
6969
let tock;
7070
do {
71-
while (tock = queue.shift()) {
71+
while ((tock = queue.shift()) !== null) {
7272
const asyncId = tock[async_id_symbol];
7373
emitBefore(asyncId, tock[trigger_async_id_symbol], tock);
7474

0 commit comments

Comments
 (0)