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
ERROR TypeError: this.ref.orderBy is not a function
queryPoint index.esm.js:1502
queries index.esm.js:1460
within index.esm.js:1459
getNearbyDiscounts distance.service.ts:91
This occurs only when we pass a reference in the query method of the geo client:
const discountsRef = this.angularFirestore.collection('discounts');
this.geoClient.query("discounts").within(this.centerPoint, radius, Constants.dctPoint); // Works like this. But won't if passing discountRef => this.ref.orderBy is not a function
I thought in the beginning it occurred because the query Ref I was passing to geoClient.query() had already orderBy set, but the error still occurs after removing it.
I need to pass a ref because I have dynamic compound queries to be added on the ref.
I tried to understand the error but it feels there's an issue with the code itself at the following line.
GeoFireQuery.prototype.queryPoint = function (geohash, field) {
var end = geohash + '~';
return this.ref
.orderBy(field + ".geohash")
.startAt(geohash)
.endAt(end);
};
Can anyone help me or advise me for a workaround please?
Thanks
The text was updated successfully, but these errors were encountered:
Hi,
I'm currently getting the following error:
This occurs only when we pass a reference in the query method of the geo client:
I thought in the beginning it occurred because the query Ref I was passing to geoClient.query() had already orderBy set, but the error still occurs after removing it.
I need to pass a ref because I have dynamic compound queries to be added on the ref.
I tried to understand the error but it feels there's an issue with the code itself at the following line.
Can anyone help me or advise me for a workaround please?
Thanks
The text was updated successfully, but these errors were encountered: