Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug mapp nodemap #897

Merged
merged 24 commits into from
Nov 12, 2021
Merged

Bug mapp nodemap #897

merged 24 commits into from
Nov 12, 2021

Conversation

Aid19801
Copy link
Contributor

This PR seeks to implement optional chaining to the nodemap search.

Comment on lines 89 to 90
m?.countryName?.toLowerCase().includes(searchTerm) ||
m?.ISO3?.toLowerCase().includes(searchTerm)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you make this filter function a bit shorter -

      const filtered = formatted.filter(
        (m) =>
          m.countryName?.toLowerCase().includes(searchTerm) ||
          m.ISO3?.toLowerCase().includes(searchTerm),
      );

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much neater thank you

@jstuczyn jstuczyn merged commit 3dc9422 into develop Nov 12, 2021
@jstuczyn jstuczyn deleted the bug-mapp-nodemap branch November 12, 2021 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants