From c68ecee6a9b119dd17f5ada64c4e8dc85d384efb Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Sat, 14 Dec 2019 14:56:03 -0500 Subject: [PATCH] dgram: use for...of PR-URL: https://github.com/nodejs/node/pull/30999 Reviewed-By: James M Snell Reviewed-By: Yuta Hiroto Reviewed-By: Ruben Bridgewater Reviewed-By: Rich Trott --- lib/dgram.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dgram.js b/lib/dgram.js index 5f7e8f032cf998..b17def6cec9d1c 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -532,8 +532,8 @@ function clearQueue() { state.queue = undefined; // Flush the send queue. - for (let i = 0; i < queue.length; i++) - queue[i](); + for (const queueEntry of queue) + queueEntry(); } function isConnected(self) {