Finding by userId not working

In my publications I have Mirrors where you can add images and colors that are reflecting ones personality.

return Mirrors.find({$or:[ {userId:this.userId},{owner:this.userId} ]},options);

I need to access both the Mirrors that are per user but also per owner in order to have control of group mirrors.

In a helper I have:

var userId = Meteor.userId() return Mirrors.find({userId:userId},{sort:{category:-1,object:1}});

This doesn’t work. But if I find using owner is does. Why?

I can’t see any error.

Have you tried to print out the contents of your find() cursor to the console, like this:

const cursor = Mirrors.find({$or:[ {userId:this.userId},{owner:this.userId} ]},options);
return cursor;

Maybe this shows you why no documents are being found?