I have a collection, times, the publish for which is filtered by eventId:
Meteor.publish("times", function (eventId) {
return Times.find({
eventId: eventId
});
});
On the client, in the console, if I subscribe:
timesSub = Meteor.subscribe("times", "event1");
I get the three times for event1:
Times.find().fetch()
Array [ Object, Object, Object ]
So far so good.
However, if I stop the subscription:
timesSub.stop
the data is still there:
Times.find().fetch()
Array [ Object, Object, Object ]
And if a resubscribe with a different event (which has 4 times):
timesSub = Meteor.subscribe("times", "event2");
I get the data from both subscriptions:
Times.find().fetch()
Array [ Object, Object, Object, Object, Object, Object, Object ]
What am I missing? Thanks!