diff --git a/selector/src/commonMain/kotlin/li/songe/selector/Transform.kt b/selector/src/commonMain/kotlin/li/songe/selector/Transform.kt index 851aed51..48521811 100644 --- a/selector/src/commonMain/kotlin/li/songe/selector/Transform.kt +++ b/selector/src/commonMain/kotlin/li/songe/selector/Transform.kt @@ -175,7 +175,7 @@ class Transform @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) } } diff --git a/selector/src/commonMain/kotlin/li/songe/selector/unit/SelectorLogicalOperator.kt b/selector/src/commonMain/kotlin/li/songe/selector/unit/SelectorLogicalOperator.kt index 423d9451..0deeec56 100644 --- a/selector/src/commonMain/kotlin/li/songe/selector/unit/SelectorLogicalOperator.kt +++ b/selector/src/commonMain/kotlin/li/songe/selector/unit/SelectorLogicalOperator.kt @@ -98,7 +98,7 @@ sealed class SelectorLogicalOperator(val key: String) : Stringify, SelectorExpre expression: LogicalSelectorExpression, ): QueryResult { val leftValue = expression.left.matchContext(context, transform, option) - if (leftValue.context.matched) { + if (leftValue.matched) { return QueryResult.OrResult(expression, leftValue) } return QueryResult.OrResult(