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

Handle null e.g. in the case of manual bbox #528

Merged
merged 1 commit into from
Feb 24, 2024

Conversation

byronigoe
Copy link
Contributor

The interface used to support entering your own bounding box as a comma-separated list of 4 numbers. This is now broken because adminName2 will be null.

Uncaught TypeError: Cannot read properties of undefined (reading 'startsWith')
    at A.handleSearch (ExportAOI.js:140:27)
    at A.handleChange (SearchAOIToolbar.js:53:18)
    at Object.<anonymous> (SearchAOIToolbar.js:29:12)

This fix uses optional chaining to avoid this error.

Copy link
Member

@kshitijrajsharma kshitijrajsharma left a comment

Choose a reason for hiding this comment

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

Thanks for the PR !

@kshitijrajsharma kshitijrajsharma merged commit 28f58b3 into hotosm:master Feb 24, 2024
1 check passed
@byronigoe byronigoe deleted the null-adminName2 branch February 24, 2024 06: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.

None yet

2 participants