Skip to content

Commit dcaa881

Browse files
author
Vikas Agarwal
committed
Github issue#2921, Cannot read property 'title' of undefined
— Should be fixed. Root cause is that some how a customer role user is being rendered in the topcoder team dialog. However, this fix should allow graceful failing in such situations as well.
1 parent e8c8ba6 commit dcaa881

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/TeamManagement/TopcoderManagementDialog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class TopcoderManagementDialog extends React.Component {
172172
const lastName = _.get(member, 'lastName', '')
173173
let userFullName = `${firstName} ${lastName}`
174174
userFullName = userFullName.trim().length > 0 ? userFullName : 'Connect user'
175-
const role = _.find(this.roles, r => r.value === member.role).title
175+
const role = _.get(_.find(this.roles, r => r.value === member.role), 'title')
176176
return (
177177
<div
178178
key={i}

0 commit comments

Comments
 (0)