Skip to content
This repository has been archived by the owner on May 15, 2021. It is now read-only.

Commit

Permalink
defensive coding
Browse files Browse the repository at this point in the history
  • Loading branch information
Connoropolous committed Dec 24, 2020
1 parent 348ca5f commit 1ace0b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/Dashboard/DashboardListProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function DashboardListProject({

const projectInitials = project.name
.split(' ')
.map(word => word[0].toUpperCase())
.map(word => word ? word[0].toUpperCase() : 'X')
.slice(0, 3)

return (
Expand Down Expand Up @@ -45,7 +45,7 @@ export default function DashboardListProject({
<div className='dashboard-list-project-members'>
<div className='dashboard-list-project-member-list'>
{project.members.map(member => (
<Avatar
member && <Avatar
key={member.address}
first_name={member.first_name}
last_name={member.last_name}
Expand Down

0 comments on commit 1ace0b0

Please sign in to comment.