mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Only save settings once during node load process
This commit is contained in:
parent
8d9b6dd859
commit
0117df0960
@ -143,6 +143,12 @@ function loadModuleFiles(modules) {
|
||||
return loadNodeSetList(pluginList);
|
||||
}).then(function() {
|
||||
return loadNodeSetList(nodeList);
|
||||
}).then(function () {
|
||||
if (settings.available()) {
|
||||
return registry.saveNodeList();
|
||||
} else {
|
||||
return
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -436,7 +442,7 @@ async function loadPlugin(plugin) {
|
||||
return plugin;
|
||||
}
|
||||
}
|
||||
|
||||
let invocation = 0
|
||||
function loadNodeSetList(nodes) {
|
||||
var promises = [];
|
||||
nodes.forEach(function(node) {
|
||||
@ -451,13 +457,7 @@ function loadNodeSetList(nodes) {
|
||||
}
|
||||
});
|
||||
|
||||
return Promise.all(promises).then(function() {
|
||||
if (settings.available()) {
|
||||
return registry.saveNodeList();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
});
|
||||
return Promise.all(promises)
|
||||
}
|
||||
|
||||
function addModule(module) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user