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

fix(query): leave coordinates array as-is in geo queries #263

Merged
merged 1 commit into from
Mar 15, 2016

Conversation

Zertz
Copy link
Collaborator

@Zertz Zertz commented Mar 11, 2016

This tries to guess if a value being JSON.parse'd is likely to be a coordinate. The key must be coordinates and the value must be an array of two numbers.

However, I'm not sure if it may cause issues in some cases.

Closes #187

@Zertz Zertz force-pushed the fix-issue-187 branch 2 times, most recently from b5f3978 to 3cd645a Compare March 14, 2016 19:35
@Zertz Zertz added the bug label Mar 14, 2016
@Zertz
Copy link
Collaborator Author

Zertz commented Mar 14, 2016

@florianholzapfel Can you have a quick look?

There is an edge case where it is breaking and that is if a user has a field named coordinates that takes an array that happens to look like coordinates, but should still be queried with $in. Seems unlikely!

florianholzapfel added a commit that referenced this pull request Mar 15, 2016
fix(query): leave coordinates array as-is in geo queries
@florianholzapfel florianholzapfel merged commit 2add592 into master Mar 15, 2016
@florianholzapfel
Copy link
Owner

yes, this seems very unlikely

@Zertz Zertz deleted the fix-issue-187 branch March 15, 2016 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants