Skip to content

Commit

Permalink
Merge pull request #331 from Plant-for-the-Planet-org/feature/resolve…
Browse files Browse the repository at this point in the history
…-no-tpo-name-crash

fix: fix crash due to null tpo name for project
  • Loading branch information
sagararyal authored Sep 27, 2022
2 parents f1d17aa + c7c4944 commit f004c01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Donations/Components/SelectProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ function SelectProject({}: Props): ReactElement {
/>
) : (
<div className="project-organisation-image no-project-organisation-image">
{project.properties.tpo.name.charAt(0)}
{project.properties.tpo.name?.charAt(0) ||
project.properties.tpo.slug?.charAt(0).toUpperCase() ||
""}
</div>
)}
{project.properties.country && (
Expand Down

0 comments on commit f004c01

Please sign in to comment.