Skip to content

Commit be7163c

Browse files
authored
Fixes queryRecord when used with ref query interface (#608)
When using `ref => ref.orderBy` (for instance), the resulting reference responds to `limit` (as it is a method provided by the firestore library). It's not necessary to check for a `limit` arg as it will simply be ignored. So this commit removes it.
1 parent a5df6c7 commit be7163c

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

addon/adapters/firestore.ts

-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ export default class FirestoreAdapter extends DS.Adapter.extend({
157157
return rootCollection(this, type).then((ref:firestore.CollectionReference) => {
158158
const queryOrRef = queryRecordOptionsToQueryFn(options)(ref);
159159
if (isQuery(queryOrRef)) {
160-
if (queryOrRef.limit) { throw "Dont specify limit on queryRecord" }
161160
return queryOrRef.limit(1).get();
162161
} else {
163162
(options as any).id = queryOrRef.id;

0 commit comments

Comments
 (0)