Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Rx.Observable.prototype.manySelect() error behavior #1358

Open
manbaum opened this issue Nov 5, 2016 · 0 comments · May be fixed by #1522
Open

Rx.Observable.prototype.manySelect() error behavior #1358

manbaum opened this issue Nov 5, 2016 · 0 comments · May be fixed by #1522

Comments

@manbaum
Copy link

manbaum commented Nov 5, 2016

The following code is adaped from What does the new ManySelect operator do?

var projection = ["a", "b", "c"];
var count = 0;
Rx.Observable.range(1, 3)
  .do(Rx.Observer.create(
    x  => console.log(`Generate Next ${x}`),
    e  => console.log(`Generate Error ${e.message}`),
    () => console.log(`Generate Completed`)
  ))
  .manySelect(ys => {
    var k = ++count;
    return ys.map(x => `${k}, ${projection[x - 1]}`);
  })
  .mergeAll()
  .subscribe(Rx.Observer.create(
    x  => console.log(`Next ${x}`),
    e  => console.log(`Error ${e.message}`),
    () => console.log(`Completed`)
  ));

According to the documentation of manySelect(), the code above should produce the output like below:

"Generate Next 1"
"Generate Next 2"
"Next 1, a"
"Generate Next 3"
"Next 1, b"
"Next 2, b"
"Generate Completed"
"Next 1, c"
"Next 2, c"
"Next 3, c"
"Completed"

But actually, it gives the following result:

"Generate Next 1"
"Next 1, a"
"Generate Next 2"
"Error innerSource.subscribe is not a function"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant