Merge pull request #2587 from justinr1234/fix-board-query

Fix board query
This commit is contained in:
Lauri Ojansivu 2019-08-07 00:46:59 +03:00 committed by GitHub
commit b23282d426
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(