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:
parent
81df74dfc8
commit
e19b8d35a9
@ -67,6 +67,7 @@ var registry = (function() {
|
|||||||
|
|
||||||
for (var module in moduleConfigs) {
|
for (var module in moduleConfigs) {
|
||||||
if (moduleConfigs.hasOwnProperty(module)) {
|
if (moduleConfigs.hasOwnProperty(module)) {
|
||||||
|
if (Object.keys(moduleConfigs[module].nodes).length > 0) {
|
||||||
if (!moduleList[module]) {
|
if (!moduleList[module]) {
|
||||||
moduleList[module] = {
|
moduleList[module] = {
|
||||||
name: module,
|
name: module,
|
||||||
@ -83,11 +84,13 @@ var registry = (function() {
|
|||||||
delete n.err;
|
delete n.err;
|
||||||
delete n.file;
|
delete n.file;
|
||||||
delete n.id;
|
delete n.id;
|
||||||
|
n.file = config.file;
|
||||||
moduleList[module].nodes[node] = n;
|
moduleList[module].nodes[node] = n;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (settings.available()) {
|
if (settings.available()) {
|
||||||
return settings.set("nodes",moduleList);
|
return settings.set("nodes",moduleList);
|
||||||
} else {
|
} else {
|
||||||
@ -208,6 +211,7 @@ var registry = (function() {
|
|||||||
infoList.push(registry.removeNode(module+"/"+nodes[i]));
|
infoList.push(registry.removeNode(module+"/"+nodes[i]));
|
||||||
}
|
}
|
||||||
delete moduleNodes[module];
|
delete moduleNodes[module];
|
||||||
|
delete moduleConfigs[module];
|
||||||
saveNodeList();
|
saveNodeList();
|
||||||
return infoList;
|
return infoList;
|
||||||
},
|
},
|
||||||
@ -440,6 +444,7 @@ var registry = (function() {
|
|||||||
removed = true;
|
removed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
delete moduleConfigs[mod];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user