mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Break dependency between livedata and mongo-livedata
This commit is contained in:
@@ -440,10 +440,14 @@ _.extend(Meteor._LivedataSession.prototype, {
|
||||
|
||||
var res = handler.apply(sub, params || []);
|
||||
|
||||
// automatically wire up handlers that return a Cursor.
|
||||
// otherwise, the handler is completely responsible for delivering
|
||||
// its own data messages and registering stop functions.
|
||||
if (res instanceof _Mongo.Cursor) // XXX generalize
|
||||
// if Meteor._RemoteCollectionDriver is available (defined in
|
||||
// mongo-livedata), automatically wire up handlers that return a
|
||||
// Cursor. otherwise, the handler is completely responsible for
|
||||
// delivering its own data messages and registering stop
|
||||
// functions.
|
||||
//
|
||||
// XXX generalize
|
||||
if (Meteor._RemoteCollectionDriver && (res instanceof Meteor._Mongo.Cursor))
|
||||
sub._publishCursor(res);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user