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

Check node props when deciding if pasted node can splice links

Fixes #2494
This commit is contained in:
Nick O'Leary 2020-03-29 20:33:15 +01:00
parent 84771f5864
commit 6ae7c51dc5
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -3531,8 +3531,10 @@ RED.view = (function() {
if (new_ms.length === 1) { if (new_ms.length === 1) {
node = new_ms[0]; node = new_ms[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.keyboard.add("*","escape",function(){ RED.keyboard.add("*","escape",function(){