Skip to content

Commit

Permalink
Fix: short circuit on principal expression lookup short-circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
eyelidlessness committed Jul 25, 2024
1 parent 16719b4 commit e7c7e80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/xforms-engine/src/parse/xpath/syntax-traversal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const findTypedPrincipalExpressionNode = <const Type extends AnySyntaxTyp
): TypedSyntaxNode<Type> | null => {
const [first, ...rest] = collectTypedNodes(types, xpathNode);

if (first == null || rest.length > 1) {
if (first == null || rest.length > 0) {
return null;
}

Expand Down

0 comments on commit e7c7e80

Please sign in to comment.