diff --git a/packages/accounts-base/accounts_client.js b/packages/accounts-base/accounts_client.js index 0a50eba3d8..796efc1b2f 100644 --- a/packages/accounts-base/accounts_client.js +++ b/packages/accounts-base/accounts_client.js @@ -17,9 +17,13 @@ var userId = Meteor.userId(); if (!userId) return null; - if (Meteor.userLoaded()) - return Meteor.users.findOne(userId); - // Not yet loaded: return a minimal object. + if (Meteor.userLoaded()) { + var user = Meteor.users.findOne(userId); + if (user) return user; + } + // Either the subscription isn't done yet, or for some reason this user has + // no published fields (and thus is considered to not exist in + // minimongo). Return a minimal object. return {_id: userId}; };