Explorar o código

Fix board query

Justin Reynolds %!s(int64=5) %!d(string=hai) anos
pai
achega
b31a74e9af
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/publications/boards.js

+ 1 - 1
server/publications/boards.js

@@ -9,7 +9,7 @@ Meteor.publish('boards', function() {
 
   // Defensive programming to verify that starredBoards has the expected
   // format -- since the field is in the `profile` a user can modify it.
-  const { starredBoards = [] } = Users.findOne(this.userId).profile || {};
+  const { starredBoards = [] } = Users.findOne(this.userId).profile || [];
   check(starredBoards, [String]);
 
   return Boards.find(