mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix subflow calls
This commit is contained in:
parent
29df7e84a1
commit
e653a933f1
@ -44,12 +44,13 @@ module.exports = function(RED) {
|
||||
* @returns {LinkTarget} a link target object
|
||||
*/
|
||||
function generateTarget(node) {
|
||||
const isSubFlow = node._flow.TYPE === "subflow";
|
||||
return {
|
||||
id: node.id,
|
||||
name: node.name || node.id,
|
||||
flowId: node._flow.flow.id,
|
||||
flowName: node._flow.flow.label,
|
||||
isSubFlow: false
|
||||
flowName: isSubFlow ? node._flow.subflowDef.name : node._flow.flow.label,
|
||||
isSubFlow: isSubFlow
|
||||
}
|
||||
}
|
||||
return {
|
||||
@ -109,6 +110,9 @@ module.exports = function(RED) {
|
||||
if(idx > -1) {
|
||||
targs.splice(idx,1);
|
||||
}
|
||||
if(targs.length === 0) {
|
||||
delete registry.named[tn.name];
|
||||
}
|
||||
}
|
||||
delete registry.ids[target.id];
|
||||
},
|
||||
@ -175,7 +179,7 @@ module.exports = function(RED) {
|
||||
function LinkCallNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
const node = this;
|
||||
const staticTarget = n.links[0];
|
||||
const staticTarget = typeof n.links === "string" ? n.links : n.links[0];
|
||||
const linkType = n.linkType;
|
||||
const messageEvents = {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user