mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Handle importing only one end of a link node pair
This commit is contained in:
parent
a10439b67c
commit
266274135e
@ -482,7 +482,7 @@ RED.view = (function() {
|
||||
try {
|
||||
nn._def.onadd.call(nn);
|
||||
} catch(err) {
|
||||
console.log("onadd:",err);
|
||||
console.log("Definition error: "+nn.type+".onadd:",err);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -2581,7 +2581,7 @@ RED.view = (function() {
|
||||
try {
|
||||
node.n._def.onadd.call(node.n);
|
||||
} catch(err) {
|
||||
console.log("onadd:",err);
|
||||
console.log("Definition error: "+node.n.type+".onadd:",err);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user