You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps:
1.) Start a location update for a specific location
2.) Follow up with an update criteria call. (This has to happen before step 1, hence the no network connectivity scenario being simulated)
Note that in my case, there are ~30 geofire keys to be returned when there is network connectivity.
Actual:
A 'ready' event is falsely fired for the second call, even though the db was not queried yet. The code is ignoring the current queries ongoing for the second call, and thinks that there are no outstanding queries when the second call is invoked because of this line that I replaced:
this._outstandingGeohashReadyEvents = geohashesToQuery.slice();
Expected: (After this change)
The 'ready' event is only fired when all existing queries have been returned.
The text was updated successfully, but these errors were encountered:
crocodile
changed the title
'ready' callback fires prematurely when updateCriteria() is called again before it's previous invocation has been completed
'ready' callback fires prematurely when updateCriteria() is called again before its previous invocation has been completed
Apr 19, 2020
Prerequisites:
Test with no network connectivity
Steps:
1.) Start a location update for a specific location
2.) Follow up with an update criteria call. (This has to happen before step 1, hence the no network connectivity scenario being simulated)
Note that in my case, there are ~30 geofire keys to be returned when there is network connectivity.
Actual:
A 'ready' event is falsely fired for the second call, even though the db was not queried yet. The code is ignoring the current queries ongoing for the second call, and thinks that there are no outstanding queries when the second call is invoked because of this line that I replaced:
this._outstandingGeohashReadyEvents = geohashesToQuery.slice();
Expected: (After this change)
The 'ready' event is only fired when all existing queries have been returned.
See my fix:
https://github.com/crocodile/geofire-js/blob/829bc49c04800b09df198cb81be03e11405caaef/src/GeoQuery.ts#L406-L411
The text was updated successfully, but these errors were encountered: