mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Refactor saveNodeList
This commit is contained in:
parent
57bc83b2a7
commit
e28f933f64
@ -65,15 +65,14 @@ var registry = (function() {
|
||||
function saveNodeList() {
|
||||
var moduleList = {};
|
||||
|
||||
for (var mod in moduleConfigs) {
|
||||
if (moduleConfigs.hasOwnProperty(mod)) {
|
||||
var module = mod;
|
||||
for (var module in moduleConfigs) {
|
||||
if (moduleConfigs.hasOwnProperty(module)) {
|
||||
if (!moduleList[module]) {
|
||||
moduleList[module] = {};
|
||||
moduleList[module].name = module;
|
||||
moduleList[module].nodes = {};
|
||||
}
|
||||
var nodes = moduleConfigs[mod].nodes;
|
||||
var nodes = moduleConfigs[module].nodes;
|
||||
for(var node in nodes) {
|
||||
if (nodes.hasOwnProperty(node)) {
|
||||
var config = nodes[node];
|
||||
|
Loading…
Reference in New Issue
Block a user