Browse Source

fix error from notifications subscriptions

Jonathan Baird 5 years ago
parent
commit
8ea86ae0b9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      server/publications/notifications.js

+ 2 - 1
server/publications/notifications.js

@@ -94,7 +94,8 @@ Meteor.publish('notificationUsers', function() {
 });
 
 function activities() {
+  const notifications = Meteor.user().profile.notifications || [];
   return Activities.find({
-    _id: { $in: Meteor.user().profile.notifications.map(v => v.activity) },
+    _id: { $in: notifications.map(v => v.activity) },
   });
 }