Added null check to for loop

This commit is contained in:
Bryan Roe 2021-06-09 12:13:23 -07:00
parent d7dee2c869
commit 13f9f27ff1

View File

@ -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];
}