2
0
Эх сурвалжийг харах

fix error from notifications subscriptions

Jonathan Baird 5 жил өмнө
parent
commit
8ea86ae0b9

+ 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) },
   });
 }