1
0
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:
Anna Thomas 2014-11-28 09:17:46 +00:00
parent 57bc83b2a7
commit e28f933f64

View File

@ -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];