Skip to content

Commit 6b668f7

Browse files
fix(Node): Take the head (not tail) of path in Node.matching
1 parent 7a03723 commit 6b668f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/path/node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ export default class Node {
5656
static matching(first: Node[], second: Node[]): Node[] {
5757
let matchedCount = first.reduce((prev, node, i) =>
5858
prev === i && i < second.length && node.state === second[i].state ? i + 1 : prev, 0);
59-
return first.slice(matchedCount);
59+
return first.slice(0, matchedCount);
6060
}
6161
}

0 commit comments

Comments
 (0)