Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/geofire/src/GeoQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,10 @@ export class GeoQuery {
// and, if so, mark the value event as fired.
// Note that Firebase fires the 'value' event after every 'child_added' event fires.
const valueUnsubscribe = onValue(firebaseQuery, () => {
off(firebaseQuery, 'value', valueUnsubscribe);
this._geohashQueryReadyCallback(toQueryStr);
setTimeout(() => {
valueUnsubscribe();
this._geohashQueryReadyCallback(toQueryStr);
}, 0);
});

// Add the geohash query to the current geohashes queried dictionary and save its state
Expand Down