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 70cf7b0c5a
commit d13dc4fba3
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 1 additions and 1 deletions

View File

@ -1939,7 +1939,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