Skip to content

Commit

Permalink
Merge pull request #12628 from 0xmiroslav/issue-12435
Browse files Browse the repository at this point in the history
fix crash on workspace members page after login from deeplink url
  • Loading branch information
NikkiWines authored Nov 10, 2022
2 parents c2e4ab2 + e390f6a commit 84b3894
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/participantPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default PropTypes.shape({
displayName: PropTypes.string,

// Avatar url of participant
avatar: PropTypes.string,
avatar: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),

/** First Name of the participant */
firstName: PropTypes.string,
Expand Down
4 changes: 2 additions & 2 deletions src/pages/workspace/WorkspaceMembersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import * as Expensicons from '../../components/Icon/Expensicons';

const propTypes = {
/** The personal details of the person who is logged in */
personalDetails: personalDetailsPropType.isRequired,
personalDetails: personalDetailsPropType,

/** URL Route params */
route: PropTypes.shape({
Expand Down Expand Up @@ -293,7 +293,7 @@ class WorkspaceMembersPage extends React.Component {
if (email !== this.props.session.email && email !== this.props.policy.owner) {
removableMembers.push(email);
}
const details = this.props.personalDetails[email] || {displayName: email, login: email, avatar: Expensicons.FallbackAvatar};
const details = lodashGet(this.props.personalDetails, email, {displayName: email, login: email, avatar: Expensicons.FallbackAvatar});
data.push({
...policyMember,
...details,
Expand Down

0 comments on commit 84b3894

Please sign in to comment.