From 6ae7c51dc53278d690d783c242856d392133fa21 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sun, 29 Mar 2020 20:33:15 +0100 Subject: [PATCH] Check node props when deciding if pasted node can splice links Fixes #2494 --- .../node_modules/@node-red/editor-client/src/js/ui/view.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js index 7a561d9cd..80a9432f7 100755 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js @@ -3531,8 +3531,10 @@ RED.view = (function() { if (new_ms.length === 1) { node = new_ms[0]; spliceActive = node.n.hasOwnProperty("_def") && - node.n._def.inputs > 0 && - node.n._def.outputs > 0; + ((node.n.hasOwnProperty("inputs") && node.n.inputs > 0) || (!node.n.hasOwnProperty("inputs") && node.n._def.inputs > 0)) && + ((node.n.hasOwnProperty("outputs") && node.n.outputs > 0) || (!node.n.hasOwnProperty("outputs") && node.n._def.outputs > 0)) + + } } RED.keyboard.add("*","escape",function(){