Skip to content

Commit

Permalink
Merge pull request #3762 from andykb9b13/WV-158
Browse files Browse the repository at this point in the history
add optional chaining operator to organization and guide information …
  • Loading branch information
DaleMcGrew authored Oct 27, 2023
2 parents f97c591 + 9f8abab commit c030295
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/js/pages/Values/OneValue.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,18 +211,18 @@ class OneValue extends Component {
});
organizationsForValue = filter(organizationsForValueModified,
(organization) => (
organization.organization_name.toLowerCase().includes(searchTextLowercase) ||
organization.twitter_description.toLowerCase().includes(searchTextLowercase) ||
organization.organization_twitter_handle.toLowerCase().includes(searchTextLowercase)
organization.organization_name?.toLowerCase().includes(searchTextLowercase) ||
organization.twitter_description?.toLowerCase().includes(searchTextLowercase) ||
organization.organization_twitter_handle?.toLowerCase().includes(searchTextLowercase)
));
organizationsForValueLength = organizationsForValue.length;
organizationListIdentifier = `${valueSlug}${organizationsForValueLength}`;
}
if (showEndorsersForThisElection) {
voterGuidesForValue = filter(voterGuidesForValue,
(guide) => guide.voter_guide_display_name.toLowerCase().includes(searchTextLowercase) ||
guide.twitter_description.toLowerCase().includes(searchTextLowercase) ||
guide.twitter_handle.toLowerCase().includes(searchTextLowercase));
(guide) => guide.voter_guide_display_name?.toLowerCase().includes(searchTextLowercase) ||
guide.twitter_description?.toLowerCase().includes(searchTextLowercase) ||
guide.twitter_handle?.toLowerCase().includes(searchTextLowercase));
}
}

Expand Down

0 comments on commit c030295

Please sign in to comment.