diff --git a/red/nodes/registry.js b/red/nodes/registry.js index b3ca1e97d..bc606f5b1 100644 --- a/red/nodes/registry.js +++ b/red/nodes/registry.js @@ -52,7 +52,7 @@ var registry = (function() { var nodeList = []; var nodeConstructors = {}; var nodeTypeToId = {}; - var nodeModules = {}; + var moduleNodes = {}; function saveNodeList() { var nodeList = {}; @@ -89,7 +89,7 @@ var registry = (function() { } else { nodeConfigs = {}; } - nodeModules = {}; + moduleNodes = {}; nodeTypeToId = {}; nodeConstructors = {}; nodeList = []; @@ -102,11 +102,10 @@ var registry = (function() { }); } - nodeModules[set.module] = nodeModules[set.module]||{nodes:[]}; - nodeModules[set.module].nodes.push(set.name); + moduleNodes[set.module] = moduleNodes[set.module]||[]; + moduleNodes[set.module].push(set.name); if (version) { - nodeModules[set.module].version = version.replace(/(\r\n|\n|\r)/gm,""); } nodeConfigs[id] = set; @@ -136,15 +135,15 @@ var registry = (function() { if (!settings.available()) { throw new Error("Settings unavailable"); } - var nodes = nodeModules[module]; + var nodes = moduleNodes[module]; if (!nodes) { throw new Error("Unrecognised module: "+module); } var infoList = []; - for (var i=0;i