-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
On my current test i have a simple publication which publishes 3 notifications
// server pub
Meteor.publish('unread.notifications', () => {
return Notifications.find({})
}And that subscription on the client
// client
const notificationsUnreadSub = server.subscribe("notifications.unread");
await notificationsUnreadSub.ready();
const notificationsCursor = server.collection('notifications')
.reactive()
console.log("is ready ->", notificationsUnreadSub.isReady())
console.log("data ->", notificationsCursor.data())And this is my console output:
is ready -> false
unreadNotifications.js:14 data -> (3) [{…}, {…}, {…}]
The unexpected thing is that my console log says "is ready: false" right after the subscription but my ".data()" call returns the only 3 subscriptions that exist.
Is there a reason for the "isReady()" to not be true right after waiting for the promise?
Metadata
Metadata
Assignees
Labels
No labels