mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-23 01:09:42 +02:00
5237 Better algorithm to pich replacement node when faking position for subgraphs
This commit is contained in:
@@ -8,6 +8,7 @@ export const findCommonAncestor = (id1: string, id2: string, treeData: TreeData)
|
||||
const visited = new Set();
|
||||
let currentId = id1;
|
||||
|
||||
// Edge case with self edges
|
||||
if (id1 === id2) {
|
||||
return parentById[id1] || 'root';
|
||||
}
|
||||
|
Reference in New Issue
Block a user