Meteor-Community-Packages / meteor-publication-collector

Test a Meteor publication by collecting its output.
https://atmospherejs.com/johanbrook/publication-collector
MIT License
33 stars 20 forks source link

Stop the subscription if an error occurs in the callback #31

Closed SimonSimCity closed 7 years ago

SimonSimCity commented 7 years ago

Here's a fix for something I ran into while playing with https://github.com/nlhuykhang/meteor-publish-join.

If an error occurs in the callback of PublicationCollector.collect() the stop method of the publication is never called.

This code makes sure that the error is thrown on (as before) and that the stop method of the publication is called.

johanbrook commented 7 years ago

Great, thanks!