瀏覽代碼

Fix board query

Justin Reynolds 5 年之前
父節點
當前提交
b31a74e9af
共有 1 個文件被更改,包括 1 次插入1 次删除
  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(