Closed hoolymama closed 8 years ago
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:
expect(collections.pairs).to.not.exist
Well, if you call .fetch()
on a collection with no documents, it'll return an empty array, not undefined
. I still think you had the correct reasoning at the top.
Yes true. (I was confused earlier). Thanks for fixing it!
Hi, I seem to be seeing this problem again. When my publish function returns nothing::
this.ready();
return;
collections.myCollection is undefined. I'd expect it to be an empty array.
I also tried
return [];
but the test still sees undefined.
Have I missed something or has this bug reappeared?
versions: johanbrook:publication-collector@1.1.0 METEOR@1.6.1
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: