Fix dynamically loading multiple node-sets from palette editor

This commit is contained in:
Nick O'Leary 2016-12-01 15:27:29 +00:00
parent 671d7e2beb
commit f68acca427
1 changed files with 2 additions and 4 deletions

View File

@ -98,11 +98,9 @@
var i,m;
var typeList;
var info;
if (topic == "node/added") {
var addedTypes = [];
for (i=0;i<msg.length;i++) {
m = msg[i];
msg.forEach(function(m) {
var id = m.id;
RED.nodes.addNodeSet(m);
addedTypes = addedTypes.concat(m.types);
@ -111,7 +109,7 @@
$("body").append(data);
});
});
}
});
if (addedTypes.length) {
typeList = "<ul><li>"+addedTypes.join("</li><li>")+"</li></ul>";
RED.notify(RED._("palette.event.nodeAdded", {count:addedTypes.length})+typeList,"success");