Skip to content

Commit

Permalink
changes imposed by npm run format
Browse files Browse the repository at this point in the history
  • Loading branch information
petermao authored and apetresc committed Jan 4, 2024
1 parent f94471a commit 2dd5882
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/modules/sabaki.js
Original file line number Diff line number Diff line change
Expand Up @@ -1563,11 +1563,11 @@ class Sabaki extends EventEmitter {
let next = tree.navigate(node.id, 1, currents)
if (next == null) return
let lowestFork = node
while (next != null) { //not at a leaf
while (next != null) {
if (next.id != node.children.slice(chIdx[0])[0].id) {
lowestFork = node;
lowestFork = node
}
sequence = [...tree.getSequence(next.id)];
sequence = [...tree.getSequence(next.id)]
node = sequence.slice(-1)[0]
next = tree.navigate(node.id, 1, currents)
}
Expand All @@ -1582,13 +1582,15 @@ class Sabaki extends EventEmitter {
next = tree.navigate(lowestFork.id, 1, currents) //using new currents

// then zero the downstream currents.
while (next.id != null) { //not at a leaf
sequence = [...tree.getSequence(next.id)];
while (next.id != null) {
sequence = [...tree.getSequence(next.id)]
node = sequence.slice(-1)[0]
if (node.children.length > 0) {
currents[node.id] = node.children.slice(chIdx[1])[0].id
next = tree.navigate(node.id, 1, currents)
} else { break }
} else {
break
}
}
}

Expand Down

0 comments on commit 2dd5882

Please sign in to comment.