From e668698b5c5510c2f1ff9a6cc875d0dbdf413de2 Mon Sep 17 00:00:00 2001 From: Matheus B Date: Mon, 22 Jan 2024 19:56:25 -0300 Subject: [PATCH] Reposition const declaration to ideal place --- packages/mermaid/src/diagrams/git/gitGraphRenderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/diagrams/git/gitGraphRenderer.js b/packages/mermaid/src/diagrams/git/gitGraphRenderer.js index 6124d72c68..cefbe89c14 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphRenderer.js +++ b/packages/mermaid/src/diagrams/git/gitGraphRenderer.js @@ -116,7 +116,6 @@ const drawCommits = (svg, commits, modifyGraph) => { const commitStep = 40; sortedKeys.forEach((key) => { const commit = commits[key]; - const posWithOffset = pos + layoutOffset; if (isParallelCommits) { if (!commit.parents.length) { @@ -133,6 +132,7 @@ const drawCommits = (svg, commits, modifyGraph) => { } } + const posWithOffset = pos + layoutOffset; const y = dir === 'TB' ? posWithOffset : branchPos[commit.branch].pos; const x = dir === 'TB' ? branchPos[commit.branch].pos : posWithOffset;