Reactive-Extensions / RxJS

The Reactive Extensions for JavaScript
http://reactivex.io
Other
19.48k stars 2.1k forks source link

Problem using ZipObservable when upgrading from previous version #1370

Open mandricore opened 7 years ago

mandricore commented 7 years ago

I have a problem that source is not an observable in my case at observable/zip.js

    var files = ['glob.js', 'index.js', 'test/test.js'];

    src(files, {noglob: true})
    .concatAll()
    .zip(files, function (file, fileName) {
        assert.equal(file.loc.source, fileName);
        assert.equal(file.program.type, 'Program');
    })
    .subscribe(function () {}, done, done);
     TypeError: source.subscribe is not a function
      at ZipObservable.subscribeCore (node_modules/rx/dist/rx.js:4186:34)

Is this due to an API change for .zip(files, function (file, fileName) { ...}) ?? Looks legit to me:

zip constructor

function ZipObservable(s, cb) {
  this._s = s;
  this._cb = cb;
  ObservableBase.call(this);
}