From f49d1ae8602c618f2e2e3707f3353389a3dd7dd8 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 1 Jul 2019 12:42:11 +0100 Subject: [PATCH] Ensure the subflow stop promise is waiting for before restarting --- packages/node_modules/@node-red/runtime/lib/nodes/flows/Flow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8b0341463..466c1341a 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 @@ -277,7 +277,7 @@ class Flow { if (this.subflowInstanceNodes[stopList[i]]) { try { (function(subflow) { - promises.push(stopNode(node,false).then(() => { subflow.stop() })); + promises.push(stopNode(node,false).then(() => subflow.stop())); })(this.subflowInstanceNodes[stopList[i]]); } catch(err) { node.error(err);