cycle-restart icon indicating copy to clipboard operation
cycle-restart copied to clipboard

Repeating when using cycle-restart?

Open ronag opened this issue 8 years ago • 0 comments

Given the following code in an intent:

  const assetUpdate$ = id$
    .flatMapLatest(id => Observable
      .merge(
        DOM
          .select('.title')
          .events('input')
          .map((e) => ({
            id,
            title: e.target.value,
          }))
      )
    )
    .do(() => console.log(1))

When using cycle-restart:

1: id$ is fired once 2: press key in ".title" field 3: "1" is printed once 2: id$ is fired 4 times 2: press key in ".title" field 3: "1" is printed 5 times

What's going on?

Re-subscribing to the same DOM element seem to duplicate stuff?

ronag avatar Mar 14 '16 10:03 ronag