User might not have profileimage by default: a regression bug.

This commit is contained in:
Vesa Luusua 2017-09-29 15:43:52 +03:00
parent 02ef54c898
commit 7615f4f64d

View file

@ -76,7 +76,8 @@ export class ProfileSettingsPageComponent extends Component {
const user = ensureCurrentUser(currentUser);
const { firstName, lastName } = user.attributes.profile;
const profileImage = image || { imageId: user.profileImage.id };
const profileImageId = user.profileImage ? user.profileImage.id : null;
const profileImage = image || { imageId: profileImageId };
const profileSettingsForm = user.id
? <ProfileSettingsForm