Handle importing only one end of a link node pair

This commit is contained in:
Nick O'Leary
2017-07-04 23:40:37 +01:00
parent a10439b67c
commit 266274135e
2 changed files with 3 additions and 3 deletions

View File

@@ -251,7 +251,7 @@
function onAdd() {
for (var i=0;i<this.links.length;i++) {
var n = RED.nodes.node(this.links[i]);
if (n.links.indexOf(this.id) === -1) {
if (n && n.links.indexOf(this.id) === -1) {
n.links.push(this.id);
}
}