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

Confirm type is a valid geojson type before finding extent #5

Merged
merged 2 commits into from
Sep 22, 2016

Conversation

mcwhittemore
Copy link
Contributor

Closes #3 and contains #4

@tmcw
Copy link
Contributor

tmcw commented Nov 2, 2015

This is probably not sufficient: a GeoJSON Feature like

{
"type": "Feature",
"properties": {
  "type": "Polygon"
}
}

is valid but would likely trigger the error.

@mcwhittemore
Copy link
Contributor Author

Added this test case and switch to checking the type based off of the attributes the current value has rather than an any match. This is still a bit more liberal than the spec as this would find geojson nested inside of properties.

@tmcw
Copy link
Contributor

tmcw commented Sep 22, 2016

👍 turf-bbox has mostly superseded this module but good to fix this bug in place.

@tmcw tmcw merged commit 1233b40 into master Sep 22, 2016
@tmcw tmcw deleted the smart-type-check branch September 22, 2016 18:38
This was referenced Sep 21, 2020
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.

2 participants