gitgraph.js
gitgraph.js copied to clipboard
Data of Branches in Commit property does't update immediately?
https://codepen.io/nicoespeon/pen/arqPWb?editors=0010
You can easily reproduce this bug. Just add two line.
console.log(gitgraph._graph.commits[0].branches)
setTimeout(()=>{console.log(gitgraph._graph.commits[0].branches)},0)
In this example https://codepen.io/nicoespeon/pen/arqPWb?editors=0010.

Why I found this because I have to change commit color of stroke.
graphData.commits.forEach(commit=>{
commit.style.dot.strokeColor = graphData.branches.get(commit.branches[0]).computedColor
})
commit.style.dot.strokeWidth = 3
commit.style.dot.strokeColor = '#e60000'
I want to reset the stroke of color to same like color of branch. Then I found this bug? or my scenario is wrong .
Is there any one know this ? I am use @gitgraph/js.
Thanks