Skip to content

Commit

Permalink
Reposition const declaration to ideal place
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbraga committed Jan 22, 2024
1 parent 3e87412 commit e668698
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mermaid/src/diagrams/git/gitGraphRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;

Expand Down

0 comments on commit e668698

Please sign in to comment.