Skip to content

Commit

Permalink
process: check for null instead of falsy in while loop
Browse files Browse the repository at this point in the history
This prepares the code for the no-cond-assign ESLint rule.

PR-URL: #41614
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
Trott authored and BethGriggs committed Jan 24, 2022
1 parent d83d55e commit cf1d3d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/process/task_queues.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit cf1d3d1

Please sign in to comment.