mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge branch 'master' into dev
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
const clone = require("clone");
|
||||
const Flow = require('./Flow').Flow;
|
||||
|
||||
const context = require('../context');
|
||||
const util = require("util");
|
||||
|
||||
const redUtil = require("@node-red/util").util;
|
||||
@@ -246,6 +246,10 @@ class Subflow extends Flow {
|
||||
this.node.on("input", function(msg) { this.send(msg);});
|
||||
this.node.on("close", function() { this.status({}); })
|
||||
this.node.status = status => this.parent.handleStatus(this.node,status);
|
||||
// Create a context instance
|
||||
console.log("Node.context",this.type,"id:",this._alias||this.id,"z:",this.z)
|
||||
this._context = context.get(this._alias||this.id,this.z);
|
||||
|
||||
|
||||
this.node._updateWires = this.node.updateWires;
|
||||
|
||||
@@ -483,7 +487,7 @@ function createNodeInSubflow(subflowInstanceId, def) {
|
||||
* properties in the nodes object to reference the new node ids.
|
||||
* This handles:
|
||||
* - node.wires,
|
||||
* - node.scope of Catch and Status nodes,
|
||||
* - node.scope of Complete, Catch and Status nodes,
|
||||
* - node.XYZ for any property where XYZ is recognised as an old property
|
||||
* @param {[type]} nodes [description]
|
||||
* @param {[type]} nodeMap [description]
|
||||
@@ -506,7 +510,7 @@ function remapSubflowNodes(nodes,nodeMap) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((node.type === 'catch' || node.type === 'status') && node.scope) {
|
||||
if ((node.type === 'complete' || node.type === 'catch' || node.type === 'status') && node.scope) {
|
||||
node.scope = node.scope.map(function(id) {
|
||||
return nodeMap[id]?nodeMap[id].id:""
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user