fix: QueryResult context error

This commit is contained in:
二刺螈
2025-03-03 20:03:50 +08:00
parent 85d1ce6ec9
commit aa7eeede77
2 changed files with 2 additions and 2 deletions

View File

@@ -175,7 +175,7 @@ class Transform<T> @JsExport.Ignore constructor(
return sequence {
getDescendants(node).forEach { childNode ->
selector.matchContext(childNode, this@Transform, option).let {
if (it.context.matched) {
if (it.matched) {
yield(it)
}
}

View File

@@ -98,7 +98,7 @@ sealed class SelectorLogicalOperator(val key: String) : Stringify, SelectorExpre
expression: LogicalSelectorExpression,
): QueryResult<T> {
val leftValue = expression.left.matchContext(context, transform, option)
if (leftValue.context.matched) {
if (leftValue.matched) {
return QueryResult.OrResult(expression, leftValue)
}
return QueryResult.OrResult(