File tree 1 file changed +2
-2
lines changed
kotlinx-coroutines-core/common/src/flow/operators
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ public fun <T> Flow<T>.take(count: Int): Flow<T> {
51
51
require(count > 0 ) { " Requested element count $count should be positive" }
52
52
return flow {
53
53
var consumed = 0
54
- // This return is needed to work around a bug in JS BE
54
+ // This return is needed to work around a bug in JS BE: KT-39227
55
55
return @flow collectWhile { value ->
56
56
emit(value)
57
57
++ consumed < count
@@ -66,7 +66,7 @@ public fun <T> Flow<T>.take(count: Int): Flow<T> {
66
66
* See [transformWhile] for a more flexible operator.
67
67
*/
68
68
public fun <T > Flow<T>.takeWhile (predicate : suspend (T ) -> Boolean ): Flow <T > = flow {
69
- // This return is needed to work around a bug in JS BE
69
+ // This return is needed to work around a bug in JS BE: KT-39227
70
70
return @flow collectWhile { value ->
71
71
if (predicate(value)) {
72
72
emit(value)
You can’t perform that action at this time.
0 commit comments