Skip to content

Commit 9552e18

Browse files
Clean up isFirstChild function
1 parent 0545239 commit 9552e18

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/talon/talonFormatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,5 +276,5 @@ function rangeEqual(a: SyntaxNode, b: SyntaxNode): boolean {
276276
}
277277

278278
function isFirstChild(node: SyntaxNode): boolean {
279-
return node.parent?.children.findIndex((n) => n.id === node.id) === 0;
279+
return node.id === node.parent?.children?.[0]?.id;
280280
}

0 commit comments

Comments
 (0)