mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 23:09:49 +02:00
Fix gitGraph findLane function error
findLane may infinite loop after recursive call, then cause RangeError: Maximum call stack size exceeded.
This commit is contained in:
@@ -336,7 +336,7 @@ const findLane = (y1, y2, _depth) => {
|
||||
return candidate;
|
||||
}
|
||||
const diff = Math.abs(y1 - y2);
|
||||
return findLane(y1, y2 - diff / 5, depth);
|
||||
return findLane(y1, y2 - diff / 5, depth + 1);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user