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

Fix splice handling when a subflow input/output node is selected

This commit is contained in:
Nick O'Leary 2016-08-26 13:34:29 +01:00
parent 2a2fc80931
commit 8542b9bf67

View File

@ -631,7 +631,8 @@ RED.view = (function() {
spliceActive = false; spliceActive = false;
if (moving_set.length === 1) { if (moving_set.length === 1) {
node = moving_set[0]; node = moving_set[0];
spliceActive = node.n._def.inputs > 0 && spliceActive = node.n.hasOwnProperty("_def") &&
node.n._def.inputs > 0 &&
node.n._def.outputs > 0 && node.n._def.outputs > 0 &&
RED.nodes.filterLinks({ source: node.n }).length === 0 && RED.nodes.filterLinks({ source: node.n }).length === 0 &&
RED.nodes.filterLinks({ target: node.n }).length === 0; RED.nodes.filterLinks({ target: node.n }).length === 0;
@ -2245,7 +2246,8 @@ RED.view = (function() {
spliceActive = false; spliceActive = false;
if (new_ms.length === 1) { if (new_ms.length === 1) {
node = new_ms[0]; node = new_ms[0];
spliceActive = node.n._def.inputs > 0 && spliceActive = node.n.hasOwnProperty("_def") &&
node.n._def.inputs > 0 &&
node.n._def.outputs > 0; node.n._def.outputs > 0;
} }
} }