This.ready with Meteor.publish null?


#1

if i have a publish with name null and it require user login to use.

Meteor.publish(null, function () {
if (!this.userId)
return vs return this.stop() vs this.ready()

return Test.find()
})

do i have to stop or set ready there, or just return is okay


#2

I usually do something like that :

Meteor.publish('settings', function() {

  const uid = Meteor.userId()
  if ( ! uid ) {
    return [] // Declares that no data is being published
  }

  ...

})

#3

yes, but what if publication’s name is null,

does it need ready or not.


#4

it looks like official package write return null