mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-18 15:56:43 +02:00
fix: failing test case caused by invalid expected value
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
@@ -353,6 +353,9 @@ const cutPathAtIntersect = (_points, boundaryNode) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const adjustForArrowHeads = function (lineData, size = 5) {
|
const adjustForArrowHeads = function (lineData, size = 5) {
|
||||||
|
if (!Array.isArray(lineData) || lineData.length < 2) {
|
||||||
|
return lineData;
|
||||||
|
}
|
||||||
const newLineData = [...lineData];
|
const newLineData = [...lineData];
|
||||||
const lastPoint = lineData[lineData.length - 1];
|
const lastPoint = lineData[lineData.length - 1];
|
||||||
const secondLastPoint = lineData[lineData.length - 2];
|
const secondLastPoint = lineData[lineData.length - 2];
|
||||||
|
Reference in New Issue
Block a user