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,
|
||||
|
||||
clearRegistry: registry.clear,
|
||||
cleanNodeList: registry.cleanNodeList,
|
||||
cleanModuleList: registry.cleanModuleList,
|
||||
|
||||
// Flow handling
|
||||
loadFlows: flows.load,
|
||||
|
@ -372,13 +372,18 @@ var registry = (function() {
|
||||
|
||||
saveNodeList: saveNodeList,
|
||||
|
||||
cleanNodeList: function() {
|
||||
cleanModuleList: function() {
|
||||
var removed = false;
|
||||
for (var mod in moduleConfigs) {
|
||||
if (moduleConfigs.hasOwnProperty(mod)) {
|
||||
if (moduleConfigs[mod] && !moduleNodes[mod]) {
|
||||
registry.removeNode(id);
|
||||
removed = true;
|
||||
var nodes = moduleConfigs[mod].nodes;
|
||||
for (var node in nodes) {
|
||||
if (nodes.hasOwnProperty(node)) {
|
||||
registry.removeNode(mod+"/"+node);
|
||||
removed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -775,5 +780,5 @@ module.exports = {
|
||||
|
||||
addModule: addModule,
|
||||
removeModule: registry.removeModule,
|
||||
cleanNodeList: registry.cleanNodeList
|
||||
cleanModuleList: registry.cleanModuleList
|
||||
};
|
||||
|
@ -91,7 +91,7 @@ function start() {
|
||||
}
|
||||
if (!settings.autoInstallModules) {
|
||||
util.log("[red] Removing modules from config");
|
||||
redNodes.cleanNodeList();
|
||||
redNodes.cleanModuleList();
|
||||
}
|
||||
}
|
||||
defer.resolve();
|
||||
|
Loading…
Reference in New Issue
Block a user