Skip to content

Commit 3e284e8

Browse files
committed
fix: QueryResult context error
1 parent 55de490 commit 3e284e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

selector/src/commonMain/kotlin/li/songe/selector/Transform.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class Transform<T> @JsExport.Ignore constructor(
175175
return sequence {
176176
getDescendants(node).forEach { childNode ->
177177
selector.matchContext(childNode, this@Transform, option).let {
178-
if (it.context.matched) {
178+
if (it.matched) {
179179
yield(it)
180180
}
181181
}

selector/src/commonMain/kotlin/li/songe/selector/unit/SelectorLogicalOperator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ sealed class SelectorLogicalOperator(val key: String) : Stringify, SelectorExpre
9898
expression: LogicalSelectorExpression,
9999
): QueryResult<T> {
100100
val leftValue = expression.left.matchContext(context, transform, option)
101-
if (leftValue.context.matched) {
101+
if (leftValue.matched) {
102102
return QueryResult.OrResult(expression, leftValue)
103103
}
104104
return QueryResult.OrResult(

0 commit comments

Comments
 (0)