From 62471e453111c2523ad3de824245811c5adf8fa8 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 8 May 2018 10:37:41 +0100 Subject: [PATCH] Handle null error object in Flow.handleError Fixes #1721 --- red/runtime/nodes/flows/Flow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/red/runtime/nodes/flows/Flow.js b/red/runtime/nodes/flows/Flow.js index 5d054a8a9..4fcdf6f58 100644 --- a/red/runtime/nodes/flows/Flow.js +++ b/red/runtime/nodes/flows/Flow.js @@ -236,8 +236,8 @@ function Flow(global,flow) { this.handleError = function(node,logMessage,msg) { var count = 1; - if (msg && msg.hasOwnProperty("error")) { - if (msg.error.hasOwnProperty("source")) { + if (msg && msg.hasOwnProperty("error") && msg.error !== null) { + if (msg.error.hasOwnProperty("source") && msg.error.source !== null) { if (msg.error.source.id === node.id) { count = msg.error.source.count+1; if (count === 10) {