mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix config node usage counts
This commit is contained in:
parent
cefa0ae5b6
commit
c24cf9c1c2
@ -344,12 +344,6 @@ RED.nodes = function() {
|
|||||||
|
|
||||||
for (var d in node._def.defaults) {
|
for (var d in node._def.defaults) {
|
||||||
node[d] = n[d];
|
node[d] = n[d];
|
||||||
if (node._def.defaults[d].type) {
|
|
||||||
var configNode = RED.nodes.node(n[d]);
|
|
||||||
if (configNode) {
|
|
||||||
configNode.users.push(node);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addNode(node);
|
addNode(node);
|
||||||
|
@ -33,9 +33,7 @@ RED.sidebar.config = function() {
|
|||||||
|
|
||||||
function refresh() {
|
function refresh() {
|
||||||
list.empty();
|
list.empty();
|
||||||
var count = 0;
|
|
||||||
RED.nodes.eachConfig(function(node) {
|
RED.nodes.eachConfig(function(node) {
|
||||||
count += 1;
|
|
||||||
var li = list.find("#tab-config-list-type-"+node.type);
|
var li = list.find("#tab-config-list-type-"+node.type);
|
||||||
if (li.length == 0) {
|
if (li.length == 0) {
|
||||||
li = $("<li>",{id:"tab-config-list-type-"+node.type}).appendTo(list);
|
li = $("<li>",{id:"tab-config-list-type-"+node.type}).appendTo(list);
|
||||||
|
Loading…
Reference in New Issue
Block a user