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() {
|
function saveNodeList() {
|
||||||
var moduleList = {};
|
var moduleList = {};
|
||||||
|
|
||||||
for (var mod in moduleConfigs) {
|
for (var module in moduleConfigs) {
|
||||||
if (moduleConfigs.hasOwnProperty(mod)) {
|
if (moduleConfigs.hasOwnProperty(module)) {
|
||||||
var module = mod;
|
|
||||||
if (!moduleList[module]) {
|
if (!moduleList[module]) {
|
||||||
moduleList[module] = {};
|
moduleList[module] = {};
|
||||||
moduleList[module].name = module;
|
moduleList[module].name = module;
|
||||||
moduleList[module].nodes = {};
|
moduleList[module].nodes = {};
|
||||||
}
|
}
|
||||||
var nodes = moduleConfigs[mod].nodes;
|
var nodes = moduleConfigs[module].nodes;
|
||||||
for(var node in nodes) {
|
for(var node in nodes) {
|
||||||
if (nodes.hasOwnProperty(node)) {
|
if (nodes.hasOwnProperty(node)) {
|
||||||
var config = nodes[node];
|
var config = nodes[node];
|
||||||
|
Loading…
Reference in New Issue
Block a user