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

Javascript error when user selects a country only #44

Closed
bbbford opened this issue Jun 17, 2016 · 1 comment
Closed

Javascript error when user selects a country only #44

bbbford opened this issue Jun 17, 2016 · 1 comment

Comments

@bbbford
Copy link

bbbford commented Jun 17, 2016

In the geocoder, type in a country only (i.e. "Canada") and select the result from the list.

mapbox-gl-geocoder.js:1 Uncaught TypeError: Cannot read property 'length' of undefined(anonymous function) @ mapbox-gl-geocoder.js:1o.value @ mapbox-gl-geocoder.js:25i.handleMouseDown @ mapbox-gl-geocoder.js:24(anonymous function) @ mapbox-gl-geocoder.js:24

@drewbo
Copy link
Collaborator

drewbo commented Jun 23, 2016

Looks like it is thrown here: https://github.com/mapbox/mapbox-gl-geocoder/blob/master/index.js#L78 if the geocoding response doesn't have context. @tristen is this as simple as adding a && selected.context... clause?

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

No branches or pull requests

2 participants