mirror of
https://github.com/wekan/wekan.git
synced 2026-01-23 17:56:09 +01:00
Fix missing profile checks
This commit is contained in:
parent
97ff2bd2fa
commit
daf314b037
12 changed files with 39 additions and 35 deletions
|
|
@ -10,7 +10,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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue