firebase/geofire-js — pull request #42 by mikepugh (2014-08-29 14:16:40+00:00)
Title: (bug) Ready event not fired in all cases

I ran into an issue where after calling query.updateCriteria() with a slightly larger radius (1 km increment), the "ready" event was not always firing. Based upon the way geohash ranges are calculated, I determined that sometimes the incremental radius results in the same set of geohashes as the prior radius, and the "ready" event callback was skipped since no new geohashes were actually queried.

From a client perspective, if I'm monitoring the "ready" event to figure out when my query is done with my latest request, this created a problem.

I've created a patch which looks for when there are no new geohashes and fires the ready event anyway, along with a test for this condition.