-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
publication returns [] but collection is undefined #5
Comments
True, I agree. Investigating. |
Hi there, I'm sorry, I didn't realise I had hit "send" on this. I intended to investigate further, because maybe your code behaves the same as a Meteor subscription. In the meantime I changed my test to this:
|
Well, if you call |
This ensures that even if a publication isn't returning any documents from its cursor, we still have a key in the resulting `collections` object in the collector's callback.
Yes true. (I was confused earlier). Thanks for fixing it! |
Fixed in #7. |
Hi, I seem to be seeing this problem again. When my publish function returns nothing::
collections.myCollection is undefined. I'd expect it to be an empty array. I also tried
but the test still sees undefined. Have I missed something or has this bug reappeared? versions: Thank you for this awesome package, it's really good. |
Hi,
I have a publication that returns a cursor. If the collection exists but the cursor has no documents, I would expect publication-collector have an empty array for that collection. Instead it is undefined.
Error: Cannot read property 'length' of undefined
If I add one document its fine.
Is this behavior expected?
Here's my publication:
and my test:
The text was updated successfully, but these errors were encountered: