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

Check both node props and defn props when deciding to splice

This commit is contained in:
Nick O'Leary 2019-08-16 14:59:15 +01:00
parent b274bafe8e
commit e72faef839
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -1158,8 +1158,8 @@ RED.view = (function() {
if (moving_set.length === 1) { if (moving_set.length === 1) {
node = moving_set[0]; node = moving_set[0];
spliceActive = node.n.hasOwnProperty("_def") && spliceActive = node.n.hasOwnProperty("_def") &&
node.n._def.inputs > 0 && ((node.n.hasOwnProperty("inputs") && node.n.inputs > 0) || (!node.n.hasOwnProperty("inputs") && node.n._def.inputs > 0)) &&
node.n._def.outputs > 0 && ((node.n.hasOwnProperty("outputs") && node.n.outputs > 0) || (!node.n.hasOwnProperty("outputs") && 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;
} }