We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8e5126 commit b9c352cCopy full SHA for b9c352c
kotlinx-coroutines-core/common/src/flow/operators/Limit.kt
@@ -102,7 +102,8 @@ public fun <T, R> Flow<T>.transformWhile(
102
@BuilderInference transform: suspend FlowCollector<R>.(value: T) -> Boolean
103
): Flow<R> =
104
safeFlow { // Note: safe flow is used here, because collector is exposed to transform on each operation
105
- collectWhile { value ->
+ // This return is needed to work around a bug in JS BE: KT-39227
106
+ return@safeFlow collectWhile { value ->
107
transform(value)
108
}
109
0 commit comments