From fc3199f3b5c8f83446e504aa29a3c2acb8f0524a Mon Sep 17 00:00:00 2001 From: CTomlyn Date: Mon, 23 Sep 2024 04:24:01 -0700 Subject: [PATCH] #2166 Nodes with looped links crash the UI in the test harness (#2167) Signed-off-by: CTomlyn --- canvas_modules/common-canvas/src/object-model/object-model.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/canvas_modules/common-canvas/src/object-model/object-model.js b/canvas_modules/common-canvas/src/object-model/object-model.js index 24d6ef38c2..20ce623f81 100644 --- a/canvas_modules/common-canvas/src/object-model/object-model.js +++ b/canvas_modules/common-canvas/src/object-model/object-model.js @@ -1556,7 +1556,8 @@ export default class ObjectModel { retval = true; } else { for (const link of pipeline.getLinks()) { - if (link.srcNodeId === startNodeId) { + if (link.srcNodeId === startNodeId && + link.srcNodeId !== link.trgNodeId) { // Ignore self-referencing links const newRetval = this.findNodesInSubGraph(link.trgNodeId, endNodeId, selection, pipelineId); if (newRetval !== true) { selection.pop();