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

Don't allow a link node virtual wire to connect to normal port

This commit is contained in:
Nick O'Leary 2019-06-17 15:37:45 +01:00
parent 46abd0cc42
commit 87a815fd6f
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -1863,7 +1863,7 @@ RED.view = (function() {
}
var link = {source: src, sourcePort:src_port, target: dst};
if (drag_line.virtualLink) {
if (/^link (in|out)$/.test(src.type) && /^link (in|out)$/.test(dst.type)) {
if (/^link (in|out)$/.test(src.type) && /^link (in|out)$/.test(dst.type) && src.type !== dst.type) {
if (src.links.indexOf(dst.id) === -1 && dst.links.indexOf(src.id) === -1) {
var oldSrcLinks = $.extend(true,{},{v:src.links}).v
var oldDstLinks = $.extend(true,{},{v:dst.links}).v