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:
parent
5b63260240
commit
9d5e855e8e
|
@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue