Skip to content

Window + Take goes on forever  #5371

Description

@JeanMeche

Bug Report

Current Behavior
The observable is never completed after the last take.

Reproduction

const window = timer(0, 100)
  .pipe(
    windowTime(1000),
    take(3),
    flatMap( value => value.pipe(toArray()))
  )

Expected behavior
In the given example, I would expect to get a third array in my subscription. But I'm only getting 2. (take(n) gives n-1 results in the subscription)

Also would expect the observable to be completed.

Environment

  • RxJS version: 6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions