Fix ordering and limit in query

This commit is contained in:
Zef Hemel
2023-10-03 16:54:03 +02:00
parent 38318556aa
commit 1e8a96ef20
5 changed files with 34 additions and 6 deletions
+2 -1
View File
@@ -83,7 +83,8 @@ export class DataStore {
results.push(entry);
itemCount++;
// Stop when the limit has been reached
if (itemCount === limit) {
if (itemCount === limit && !query.orderBy) {
// Only break when not also ordering in which case we need all results
break;
}
}