Urigo / meteor-rxjs

Exposing Mongo Cursor as RxJS Observable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ObservableCollections are not an instance of Observable

lgleim opened this issue · comments

import { Observable } from 'rxjs/Observable';
//import { ObservableCursor } from 'meteor-rxjs';

const x = SomeCollection.find({});
console.log(x instanceof Observable) // --> false

Kind of a mind bending issue given that ObservableCursor directly extends Observable (https://github.com/Urigo/meteor-rxjs/blob/master/src/ObservableCursor.ts#L7).

We first became aware of the issue by using Angular Material, which internally verifies the type of data sources as follows: https://github.com/angular/material2/blob/master/src/cdk/table/table.ts#L669

Any ideas?

meteor-rxjs has been updated by using this DOCUMENTATION for RxJS 6. That's why, you have to import Observable from rxjs not rxjs/Observable.