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

Merge pull request #3818 from node-red/fix-subflow-module-node-lookup

Register subflow module instance node with parent flow
This commit is contained in:
Nick O'Leary 2022-08-04 12:57:21 +01:00 committed by GitHub
commit d94f3a477d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,10 +134,12 @@ function createNode(flow,config) {
subflowInstanceConfig, subflowInstanceConfig,
instanceConfig instanceConfig
); );
// Register this subflow as an instance node of the parent flow.
// This allows nodes inside the subflow to get ahold of each other
// such as a node accessing its config node
flow.subflowInstanceNodes[config.id] = subflow
subflow.start(); subflow.start();
return subflow.node; return subflow.node;
Log.error(Log._("nodes.flow.unknown-type", {type:type}));
} }
} catch(err) { } catch(err) {
Log.error(err); Log.error(err);