Skip to content

Commit

Permalink
fix: prevent error if proposals have no title (#1228)
Browse files Browse the repository at this point in the history
  • Loading branch information
WaDadidou authored May 21, 2024
1 parent 9a1eb66 commit 2995ece
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/screens/Governance/GovernanceScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ export const GovernanceScreen: React.FC = () => {
}}
>
{filteredProposals
.filter((value) =>
value.content.title
.toLowerCase()
.includes(searchInput.toLowerCase()),
.filter(
(value) =>
value.content.title &&
value.content.title
.toLowerCase()
.includes(searchInput.toLowerCase()),
)
.map((proposals) => (
<GovernanceBox proposal={proposals} isMobile={isMobile} />
Expand Down

0 comments on commit 2995ece

Please sign in to comment.