summaryrefslogtreecommitdiffstats
path: root/server/publications
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-05-09 14:32:38 +0300
committerLauri Ojansivu <x@xet7.org>2019-05-09 14:32:38 +0300
commit64ee60a008c929dcf63ac5d2c49f7f189508a757 (patch)
tree5a05b4ef4cc146eff7c710d64ef4c33e3b166b75 /server/publications
parent434ed895eddb3836add1e23f0382cf0c5d3b9978 (diff)
downloadwekan-64ee60a008c929dcf63ac5d2c49f7f189508a757.tar.gz
wekan-64ee60a008c929dcf63ac5d2c49f7f189508a757.tar.bz2
wekan-64ee60a008c929dcf63ac5d2c49f7f189508a757.zip
Fix missing profile checks.
Thanks to justinr1234 !
Diffstat (limited to 'server/publications')
-rw-r--r--server/publications/boards.js2
-rw-r--r--server/publications/fast-render.js2
2 files changed, 3 insertions, 1 deletions
diff --git a/server/publications/boards.js b/server/publications/boards.js
index 144eabb8..52940739 100644
--- a/server/publications/boards.js
+++ b/server/publications/boards.js
@@ -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({
diff --git a/server/publications/fast-render.js b/server/publications/fast-render.js
index e28b6f2e..7c54c686 100644
--- a/server/publications/fast-render.js
+++ b/server/publications/fast-render.js
@@ -1,3 +1,5 @@
+import { FastRender } from 'meteor/staringatlights:fast-render';
+
FastRender.onAllRoutes(function() {
this.subscribe('boards');
});