Skip to content

Commit

Permalink
Fix error when creating connection with one term to itself
Browse files Browse the repository at this point in the history
  • Loading branch information
bindeali committed Sep 12, 2024
1 parent 8a90416 commit 3821377
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/function/FunctionLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,7 @@ export function saveNewLink(
const queries: string[] = [];
const type = iri in Links ? Links[iri].type : LinkType.DEFAULT;
const link = getNewLink(type);
setLinkBoundary(link, sid, tid);
const id = link.id as string;
if (sid === tid)
queries.push(
setSelfLoopConnectionPoints(link, paper.findViewByModel(sid).getBBox())
);
setLinkBoundary(link, sid, tid);
if (
representation === Representation.FULL ||
Expand Down Expand Up @@ -246,6 +241,10 @@ export function saveNewLink(
}
setLabels(link);
if (isLinkVisible(iri, type, AppSettings.representation)) link.addTo(graph);
if (sid === tid)
queries.push(
setSelfLoopConnectionPoints(link, paper.findViewByModel(sid).getBBox())
);
return queries;
}

Expand Down

0 comments on commit 3821377

Please sign in to comment.