From aa7a113324d1cea68cc9a611c7332088c2a19fc5 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 27 Jun 2017 13:41:43 +0100 Subject: [PATCH] More PR feedback --- src/components/structures/GroupView.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index db0b556260..71deaf529b 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -72,11 +72,11 @@ module.exports = React.createClass({ } else if (this.state.summary) { const summary = this.state.summary; let avatarUrl = null; - if (summary.profile.avatar_url) { + if (summary.profile && summary.profile.avatar_url) { avatarUrl = MatrixClientPeg.get().mxcUrlToHttp(summary.profile.avatar_url); } let description = null; - if (summary.profile.long_description) { + if (summary.profile && summary.profile.long_description) { description = sanitizedHtmlNode(summary.profile.long_description); } return ( @@ -122,6 +122,9 @@ module.exports = React.createClass({ ); } + } else { + console.error("Invalid state for GroupView"); + return
; } }, });