From c944eaab5c2b898e1a76a1e5f46b0252a55b9c68 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 12 Mar 2019 14:40:47 +0000 Subject: [PATCH] Fix max call stack err when getting node from inside subflow --- .../@node-red/runtime/lib/nodes/flows/Flow.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/node_modules/@node-red/runtime/lib/nodes/flows/Flow.js b/packages/node_modules/@node-red/runtime/lib/nodes/flows/Flow.js index a8ecf35a6..9798fd7b8 100644 --- a/packages/node_modules/@node-red/runtime/lib/nodes/flows/Flow.js +++ b/packages/node_modules/@node-red/runtime/lib/nodes/flows/Flow.js @@ -313,7 +313,7 @@ class Flow { } else if (this.activeNodes[id]) { // TEMP: this is a subflow internal node within this flow return this.activeNodes[id]; - } else { + } else if (cancelBubble) { // The node could be inside one of this flow's subflows var node; for (var sfId in this.subflowInstanceNodes) { @@ -324,10 +324,8 @@ class Flow { } } } - - - } - if (!cancelBubble) { + } else { + // Node not found inside this flow - ask the parent return this.parent.getNode(id); } return undefined;