Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengchun committed Mar 30, 2024
1 parent 3667596 commit 360713b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func (b *builder) processAxis(root *axisNode, flags flag, props *builderProp) (q
// Skip the current node(Self:false) for the next descendants nodes.
_, ok := qyGrandInput.(*contextQuery)
qyOutput = &descendantQuery{name: root.LocalName, Input: qyGrandInput, Predicate: filter, Self: ok}
*props |= builderProps.NonFlat
return qyOutput, nil
}
} else if ((flags & flagsEnum.Filter) == 0) && (root.AxeType == "descendant" || root.AxeType == "descendant-or-self") {
Expand Down Expand Up @@ -158,7 +159,7 @@ func (b *builder) processAxis(root *axisNode, flags flag, props *builderProp) (q
}
return v
}
if (*props & builderProps.NonFlat) != builderProps.None {
if (*props & builderProps.NonFlat) == 0 {
qyOutput = &childQuery{name: root.LocalName, Input: qyInput, Predicate: filter}
} else {
qyOutput = &cachedChildQuery{name: root.LocalName, Input: qyInput, Predicate: filter}
Expand Down

0 comments on commit 360713b

Please sign in to comment.