Handle undefined node properties when mapping array references

This commit is contained in:
Nick O'Leary 2016-06-20 09:38:16 +01:00
parent 0eba04aac0
commit e29a0df3fd
1 changed files with 1 additions and 1 deletions

View File

@ -903,7 +903,7 @@ RED.nodes = (function() {
if (configNode && configNode.users.indexOf(n) === -1) {
configNode.users.push(n);
}
} else if (nodeTypeArrayReferences.hasOwnProperty(n.type) && nodeTypeArrayReferences[n.type] === d3 && n[d3] !== null) {
} else if (nodeTypeArrayReferences.hasOwnProperty(n.type) && nodeTypeArrayReferences[n.type] === d3 && n[d3] !== undefined && n[d3] !== null) {
for (var j = 0;j<n[d3].length;j++) {
if (node_map[n[d3][j]]) {
n[d3][j] = node_map[n[d3][j]].id;