1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Modules not properly removed from config.json

This commit is contained in:
Nick O'Leary 2015-03-22 21:48:12 +00:00
parent 81df74dfc8
commit e19b8d35a9

View File

@ -67,23 +67,26 @@ var registry = (function() {
for (var module in moduleConfigs) {
if (moduleConfigs.hasOwnProperty(module)) {
if (!moduleList[module]) {
moduleList[module] = {
name: module,
version: moduleConfigs[module].version,
nodes: {}
};
}
var nodes = moduleConfigs[module].nodes;
for(var node in nodes) {
if (nodes.hasOwnProperty(node)) {
var config = nodes[node];
var n = filterNodeInfo(config);
delete n.loaded;
delete n.err;
delete n.file;
delete n.id;
moduleList[module].nodes[node] = n;
if (Object.keys(moduleConfigs[module].nodes).length > 0) {
if (!moduleList[module]) {
moduleList[module] = {
name: module,
version: moduleConfigs[module].version,
nodes: {}
};
}
var nodes = moduleConfigs[module].nodes;
for(var node in nodes) {
if (nodes.hasOwnProperty(node)) {
var config = nodes[node];
var n = filterNodeInfo(config);
delete n.loaded;
delete n.err;
delete n.file;
delete n.id;
n.file = config.file;
moduleList[module].nodes[node] = n;
}
}
}
}
@ -208,6 +211,7 @@ var registry = (function() {
infoList.push(registry.removeNode(module+"/"+nodes[i]));
}
delete moduleNodes[module];
delete moduleConfigs[module];
saveNodeList();
return infoList;
},
@ -440,6 +444,7 @@ var registry = (function() {
removed = true;
}
}
delete moduleConfigs[mod];
}
}
}