Removed subflow ID auto-generation, now prefixes the nodeId with the subflow id

This commit is contained in:
Steve Walsh 2023-01-03 11:42:16 +00:00
parent f4f012b531
commit 40ebf0c3ec
3 changed files with 7 additions and 3 deletions

View File

@ -12,6 +12,9 @@ To make a change to the node-red runtime being used by K4 avalanche:
# CHANGE-LOG
## 0.18.7-patch-10.3
2023-01-03
- Removed subflow ID auto-generation, now prefixes the nodeId with the subflow id
## 0.18.7-patch-10
2021-07-14
- Updated logic to swap back org to correct value when possible

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@servisbot/node-red",
"version": "0.18.7-patch-9.1",
"version": "0.18.7-patch-10",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -329,10 +329,11 @@ function createSubflow(sf,sfn,subflows,globalSubflows,activeNodes) {
var createNodeInSubflow = function(def) {
node = clone(def);
var nid = redUtil.generateId();
node_map[node.id] = node;
node._alias = node.id;
node.id = nid;
// Stop generating new node ids for nodes inside subflows
// instead we prefix it with the subflow node id, which is unique
node.id = sfn.id + '-' + node.id;
node.z = sfn.id;
newNodes.push(node);
}