mongodb/node-mongodb-native — pull request #1223 by vkarpov15 (2014-11-08 22:33:53+00:00)
Title: Fix LearnBoost/mongoose#2313: don't let user accidentally clobber geoNear params

Hi Christian,

A mongoose user ran into a fairly interesting issue - looks like you can clobber geoNear params by passing bad options to the `geoNear()` function. Obviously, specifying a `geoNear` option when calling `geoNear()` isn't necessary or useful, but would be nice to foolproof this a bit more. One user's been having some trouble with this, and you can easily imagine a case where somebody might want to do `if (options.geoNear) { collection.geoNear(x, y, options) }`