1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Preserve node properties on import

This commit is contained in:
Nick O'Leary 2016-04-21 21:51:26 +01:00
parent 819e48b03a
commit 1b06afb81c

View File

@ -847,13 +847,11 @@ RED.nodes = (function() {
node.outputs = n.outputs||node._def.outputs; node.outputs = n.outputs||node._def.outputs;
for (var d2 in node._def.defaults) { for (var d2 in node._def.defaults) {
if (node._def.defaults.hasOwnProperty(d2)) { if (node._def.defaults.hasOwnProperty(d2)) {
if (node._def.defaults[d2].type) {
node[d2] = n[d2]; node[d2] = n[d2];
} }
} }
} }
} }
}
addNode(node); addNode(node);
RED.editor.validateNode(node); RED.editor.validateNode(node);
node_map[n.id] = node; node_map[n.id] = node;