Permalink
Browse files

currently if a user is logged in, apos.user exists in browser side ja…

…vascript but it is an empty object. This is a bug. Fixed to include title, _id and username.
  • Loading branch information...
1 parent c6d52b2 commit 3c34b2b3b328ded52e7edf46e13fefed7e2c4ca5 @boutell boutell committed Jan 9, 2017
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/modules/apostrophe-templates/index.js
@@ -605,7 +605,7 @@ module.exports = {
// who want to know more about the user in browserland
// can push more data and it'll merge
if (req.user) {
- req.browserCall('apos.user = ?;', _.pick('title', '_id', 'username'));
+ req.browserCall('apos.user = ?;', _.pick(req.user, 'title', '_id', 'username'));
}
req.browserCall('apos.scene = ?', scene);

0 comments on commit 3c34b2b

Please sign in to comment.