mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Ensure configNode.users is updated properly on import
This commit is contained in:
parent
c048b1a25b
commit
a7a949377b
@ -1354,9 +1354,9 @@ RED.nodes = (function() {
|
|||||||
for (var d3 in n._def.defaults) {
|
for (var d3 in n._def.defaults) {
|
||||||
if (n._def.defaults.hasOwnProperty(d3)) {
|
if (n._def.defaults.hasOwnProperty(d3)) {
|
||||||
if (n._def.defaults[d3].type && node_map[n[d3]]) {
|
if (n._def.defaults[d3].type && node_map[n[d3]]) {
|
||||||
n[d3] = node_map[n[d3]].id;
|
configNode = node_map[n[d3]];
|
||||||
configNode = RED.nodes.node(n[d3]);
|
n[d3] = configNode.id;
|
||||||
if (configNode && configNode.users.indexOf(n) === -1) {
|
if (configNode.users.indexOf(n) === -1) {
|
||||||
configNode.users.push(n);
|
configNode.users.push(n);
|
||||||
}
|
}
|
||||||
} else if (nodeTypeArrayReferences.hasOwnProperty(n.type) && nodeTypeArrayReferences[n.type] === d3 && n[d3] !== undefined && n[d3] !== null) {
|
} else if (nodeTypeArrayReferences.hasOwnProperty(n.type) && nodeTypeArrayReferences[n.type] === d3 && n[d3] !== undefined && n[d3] !== null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user