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

harden locationToFeature against non-string country names #2122

merged 1 commit into from Oct 26, 2017


None yet
2 participants

alexcjohnson commented Oct 26, 2017

Before, with locationmode: 'country names', non-string locations would throw an error:

Uncaught TypeError: Cannot read property 'trim' of null
    at countryNameToISO3 (geo_location_utils.js:54)

Now they're just ignored silently - as opposed to strings that are unrecognized that generate a console warning. If it's just empty it seems clear you don't even want a warning. I suppose if it's not empty but also not a string it could be nice to still generate a warning, though that's not how most of plotly.js handles invalid data...

cc @etpinard


This comment has been minimized.

Show comment
Hide comment

etpinard Oct 26, 2017


Beautifully done. Thanks 💃


etpinard commented Oct 26, 2017

Beautifully done. Thanks 💃

@alexcjohnson alexcjohnson merged commit b155301 into master Oct 26, 2017

1 check passed

ci/circleci Your tests passed on CircleCI!

@alexcjohnson alexcjohnson deleted the geo-robust branch Oct 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment