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,6 +67,7 @@ var registry = (function() {
for (var module in moduleConfigs) {
if (moduleConfigs.hasOwnProperty(module)) {
if (Object.keys(moduleConfigs[module].nodes).length > 0) {
if (!moduleList[module]) {
moduleList[module] = {
name: module,
@ -83,11 +84,13 @@ var registry = (function() {
delete n.err;
delete n.file;
delete n.id;
n.file = config.file;
moduleList[module].nodes[node] = n;
}
}
}
}
}
if (settings.available()) {
return settings.set("nodes",moduleList);
} else {
@ -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];
}
}
}