From 26ca3e9aba014e1877ed3eec773acec9a66ec2e4 Mon Sep 17 00:00:00 2001 From: Joseph Yu <39754176+joseph082@users.noreply.github.com> Date: Thu, 5 Dec 2024 10:44:54 -0800 Subject: [PATCH] Fix NaN check for default waitPeriod --- queue-consumer/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/queue-consumer/index.js b/queue-consumer/index.js index 7c7a600..235b192 100644 --- a/queue-consumer/index.js +++ b/queue-consumer/index.js @@ -81,7 +81,7 @@ async function processMessage(message) { console.log(`${message.MessageId} - Received`); var waitPeriod = Number(message.Body); - if (waitPeriod === NaN) { + if (Number.isNaN(waitPeriod)) { waitPeriod = 1000; }