Skip to content

Commit eb7c8d5

Browse files
committed
fix: correct sort length access in applyQueryOptions
1 parent 24b3671 commit eb7c8d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/meteor/client/lib/cachedStores/applyQueryOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const applyQueryOptions = <T extends Record<string, any>>(records: T[], o
3838
let currentPipeline = pipe(records);
3939
if (options.sort) {
4040
const sortObj = convertSort(options.sort);
41-
for (let i = sortObj.sort.length - 1; i >= 0; i--) {
41+
for (let i = sortObj.length - 1; i >= 0; i--) {
4242
const { field, direction } = sortObj[i];
4343
currentPipeline = currentPipeline.sortByField(field, direction);
4444
}

0 commit comments

Comments
 (0)