From 7615f4f64deab325b02531354a60246780e099d1 Mon Sep 17 00:00:00 2001 From: Vesa Luusua Date: Fri, 29 Sep 2017 15:43:52 +0300 Subject: [PATCH] User might not have profileimage by default: a regression bug. --- src/containers/ProfileSettingsPage/ProfileSettingsPage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/containers/ProfileSettingsPage/ProfileSettingsPage.js b/src/containers/ProfileSettingsPage/ProfileSettingsPage.js index 8b2def6c..b8ff3768 100644 --- a/src/containers/ProfileSettingsPage/ProfileSettingsPage.js +++ b/src/containers/ProfileSettingsPage/ProfileSettingsPage.js @@ -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 ?