Skip to content

Commit

Permalink
Merge pull request #396 from RohitPaul0007/patch-39
Browse files Browse the repository at this point in the history
Update build-layer-graph.js
  • Loading branch information
rustedgrail authored Sep 11, 2023
2 parents 9607b91 + 29b0398 commit 609199c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/order/build-layer-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function buildLayerGraph(g, rank, relationship) {

// This assumes we have only short edges!
g[relationship](v).forEach(e => {
var u = e.v === v ? e.w : e.v,
let u = e.v === v ? e.w : e.v,
edge = result.edge(u, v),
weight = edge !== undefined ? edge.weight : 0;
result.setEdge(u, v, { weight: g.edge(e).weight + weight });
Expand Down

0 comments on commit 609199c

Please sign in to comment.