From 4c5c26a2c91de356212419ac8bc7fcf9869527e9 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Wed, 25 Dec 2024 13:17:03 +0200 Subject: [PATCH] Fix hangup with Show connections on Set/Get nodes --- web/js/setgetnodes.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web/js/setgetnodes.js b/web/js/setgetnodes.js index 4df4749..a8f8b8e 100644 --- a/web/js/setgetnodes.js +++ b/web/js/setgetnodes.js @@ -327,6 +327,8 @@ app.registerExtension({ ]; } + // Provide a default link object with necessary properties, to avoid errors as link can't be null anymore + const defaultLink = { type: 'default', color: this.slotColor }; for (const getter of this.currentGetters) { if (!this.flags.collapsed) { @@ -347,7 +349,7 @@ app.registerExtension({ ctx, start_node_slotpos, end_node_slotpos, - null, + defaultLink, false, null, this.slotColor, @@ -528,6 +530,9 @@ app.registerExtension({ // } _drawVirtualLink(lGraphCanvas, ctx) { if (!this.currentSetter) return; + + // Provide a default link object with necessary properties, to avoid errors as link can't be null anymore + const defaultLink = { type: 'default', color: this.slotColor }; let start_node_slotpos = this.currentSetter.getConnectionPos(false, 0); start_node_slotpos = [ @@ -539,7 +544,7 @@ app.registerExtension({ ctx, start_node_slotpos, end_node_slotpos, - null, + defaultLink, false, null, this.slotColor