Fix missing profile checks

This commit is contained in:
Justin Reynolds 2019-05-08 16:51:27 -05:00
parent 97ff2bd2fa
commit daf314b037
12 changed files with 39 additions and 35 deletions

View file

@ -172,7 +172,7 @@ export class Exporter {
};
result.users = Users.find(byUserIds, userFields).fetch().map((user) => {
// user avatar is stored as a relative url, we export absolute
if (user.profile.avatarUrl) {
if ((user.profile || {}).avatarUrl) {
user.profile.avatarUrl = FlowRouter.url(user.profile.avatarUrl);
}
return user;