From 13f9f27ff114985045ba3339a9ff06ba2cb97681 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Wed, 9 Jun 2021 12:13:23 -0700 Subject: [PATCH] Added null check to for loop --- agents/meshcore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agents/meshcore.js b/agents/meshcore.js index f1d80c3d..b88936f2 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -283,7 +283,7 @@ obj.DAIPC.on('connection', function (c) { function broadcastSessionsToRegisteredApps(x) { var p = {}, i; - for (i = 0; i < sendAgentMessage.messages.length; ++i) + for (i = 0; sendAgentMessage.messages != null && i < sendAgentMessage.messages.length; ++i) { p[i] = sendAgentMessage.messages[i]; }