From 681dfbae2d97e3c6c5b902472879a945d5499ed1 Mon Sep 17 00:00:00 2001 From: Rohit Paul <113459757+RohitPaul0007@users.noreply.github.com> Date: Sun, 10 Sep 2023 22:13:48 +0530 Subject: [PATCH] Update parent-dummy-chains.js --- lib/parent-dummy-chains.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/parent-dummy-chains.js b/lib/parent-dummy-chains.js index 59e95ab4..8103ab3f 100644 --- a/lib/parent-dummy-chains.js +++ b/lib/parent-dummy-chains.js @@ -1,17 +1,17 @@ module.exports = parentDummyChains; function parentDummyChains(g) { - var postorderNums = postorder(g); + let postorderNums = postorder(g); g.graph().dummyChains.forEach(v => { - var node = g.node(v); - var edgeObj = node.edgeObj; - var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); - var path = pathData.path; - var lca = pathData.lca; - var pathIdx = 0; - var pathV = path[pathIdx]; - var ascending = true; + let node = g.node(v); + let edgeObj = node.edgeObj; + let pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); + let path = pathData.path; + let lca = pathData.lca; + let pathIdx = 0; + let pathV = path[pathIdx]; + let ascending = true; while (v !== edgeObj.w) { node = g.node(v);