mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Changed cleanNodeList to cleanModuleList
This commit is contained in:
parent
bb6e27f662
commit
8f2a0b63d9
@ -129,7 +129,7 @@ module.exports = {
|
|||||||
getNodeConfig: registry.getNodeConfig,
|
getNodeConfig: registry.getNodeConfig,
|
||||||
|
|
||||||
clearRegistry: registry.clear,
|
clearRegistry: registry.clear,
|
||||||
cleanNodeList: registry.cleanNodeList,
|
cleanModuleList: registry.cleanModuleList,
|
||||||
|
|
||||||
// Flow handling
|
// Flow handling
|
||||||
loadFlows: flows.load,
|
loadFlows: flows.load,
|
||||||
|
@ -372,13 +372,18 @@ var registry = (function() {
|
|||||||
|
|
||||||
saveNodeList: saveNodeList,
|
saveNodeList: saveNodeList,
|
||||||
|
|
||||||
cleanNodeList: function() {
|
cleanModuleList: function() {
|
||||||
var removed = false;
|
var removed = false;
|
||||||
for (var mod in moduleConfigs) {
|
for (var mod in moduleConfigs) {
|
||||||
if (moduleConfigs.hasOwnProperty(mod)) {
|
if (moduleConfigs.hasOwnProperty(mod)) {
|
||||||
if (moduleConfigs[mod] && !moduleNodes[mod]) {
|
if (moduleConfigs[mod] && !moduleNodes[mod]) {
|
||||||
registry.removeNode(id);
|
var nodes = moduleConfigs[mod].nodes;
|
||||||
removed = true;
|
for (var node in nodes) {
|
||||||
|
if (nodes.hasOwnProperty(node)) {
|
||||||
|
registry.removeNode(mod+"/"+node);
|
||||||
|
removed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -775,5 +780,5 @@ module.exports = {
|
|||||||
|
|
||||||
addModule: addModule,
|
addModule: addModule,
|
||||||
removeModule: registry.removeModule,
|
removeModule: registry.removeModule,
|
||||||
cleanNodeList: registry.cleanNodeList
|
cleanModuleList: registry.cleanModuleList
|
||||||
};
|
};
|
||||||
|
@ -91,7 +91,7 @@ function start() {
|
|||||||
}
|
}
|
||||||
if (!settings.autoInstallModules) {
|
if (!settings.autoInstallModules) {
|
||||||
util.log("[red] Removing modules from config");
|
util.log("[red] Removing modules from config");
|
||||||
redNodes.cleanNodeList();
|
redNodes.cleanModuleList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defer.resolve();
|
defer.resolve();
|
||||||
|
Loading…
Reference in New Issue
Block a user