1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Handle null error object in Flow.handleError

Fixes #1721
This commit is contained in:
Nick O'Leary 2018-05-08 10:37:41 +01:00
parent 0ca3cabbe8
commit 62471e4531
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -236,8 +236,8 @@ function Flow(global,flow) {
this.handleError = function(node,logMessage,msg) { this.handleError = function(node,logMessage,msg) {
var count = 1; var count = 1;
if (msg && msg.hasOwnProperty("error")) { if (msg && msg.hasOwnProperty("error") && msg.error !== null) {
if (msg.error.hasOwnProperty("source")) { if (msg.error.hasOwnProperty("source") && msg.error.source !== null) {
if (msg.error.source.id === node.id) { if (msg.error.source.id === node.id) {
count = msg.error.source.count+1; count = msg.error.source.count+1;
if (count === 10) { if (count === 10) {