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
+1 -1
View File
@@ -181,7 +181,7 @@ export function applyQueryNoFilterKV(
): KV[] {
// Order by
if (query.orderBy) {
allItems.sort((a, b) => {
allItems = allItems.sort((a, b) => {
const aVal = a.value;
const bVal = b.value;
for (const { expr, desc } of query.orderBy!) {