From d88b4ef888c25df05e2f7c6ca5cd73da15cf7fe9 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Thu, 15 Dec 2016 10:58:45 +0000 Subject: Make the webapp robust to not receiveing a position. (#4802) --- webapp/components/user_profile.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'webapp') diff --git a/webapp/components/user_profile.jsx b/webapp/components/user_profile.jsx index 9cf2464cd..051b8d263 100644 --- a/webapp/components/user_profile.jsx +++ b/webapp/components/user_profile.jsx @@ -182,8 +182,8 @@ export default class UserProfile extends React.Component { dataContent.push(webrtc); - const position = this.props.user.position.substring(0, Constants.MAX_POSITION_LENGTH); - if (position) { + if (this.props.user.position) { + const position = this.props.user.position.substring(0, Constants.MAX_POSITION_LENGTH); dataContent.push(