Skip to content

Commit b8e5126

Browse files
committed
~ Issue KT-39227 added
1 parent 1dcf0eb commit b8e5126

File tree

1 file changed

+2
-2
lines changed
  • kotlinx-coroutines-core/common/src/flow/operators

1 file changed

+2
-2
lines changed

kotlinx-coroutines-core/common/src/flow/operators/Limit.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public fun <T> Flow<T>.take(count: Int): Flow<T> {
5151
require(count > 0) { "Requested element count $count should be positive" }
5252
return flow {
5353
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
5555
return@flow collectWhile { value ->
5656
emit(value)
5757
++consumed < count
@@ -66,7 +66,7 @@ public fun <T> Flow<T>.take(count: Int): Flow<T> {
6666
* See [transformWhile] for a more flexible operator.
6767
*/
6868
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
7070
return@flow collectWhile { value ->
7171
if (predicate(value)) {
7272
emit(value)

0 commit comments

Comments
 (0)