mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Extract handler result publish code.
This allows easier extending by packages.
This commit is contained in:
@@ -1035,6 +1035,10 @@ _.extend(Subscription.prototype, {
|
||||
if (self._isDeactivated())
|
||||
return;
|
||||
|
||||
self._publishHandlerResult(res);
|
||||
},
|
||||
|
||||
_publishHandlerResult: function (res) {
|
||||
// SPECIAL CASE: Instead of writing their own callbacks that invoke
|
||||
// this.added/changed/ready/etc, the user can just return a collection
|
||||
// cursor or array of cursors from the publish function; we call their
|
||||
@@ -1051,6 +1055,8 @@ _.extend(Subscription.prototype, {
|
||||
// reactiveThingy.publishMe();
|
||||
// });
|
||||
// };
|
||||
|
||||
var self = this;
|
||||
var isCursor = function (c) {
|
||||
return c && c._publishCursor;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user