Skip to content

Commit ea4521c

Browse files
authored
fix: Correct sort length access in applyQueryOptions (#40190)
1 parent 32f67f2 commit ea4521c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)