diff --git a/apps/meteor/client/lib/cachedStores/applyQueryOptions.ts b/apps/meteor/client/lib/cachedStores/applyQueryOptions.ts index 52f0d72e4974a..4e5abd99a45f5 100644 --- a/apps/meteor/client/lib/cachedStores/applyQueryOptions.ts +++ b/apps/meteor/client/lib/cachedStores/applyQueryOptions.ts @@ -38,7 +38,7 @@ export const applyQueryOptions = >(records: T[], o let currentPipeline = pipe(records); if (options.sort) { const sortObj = convertSort(options.sort); - for (let i = sortObj.sort.length - 1; i >= 0; i--) { + for (let i = sortObj.length - 1; i >= 0; i--) { const { field, direction } = sortObj[i]; currentPipeline = currentPipeline.sortByField(field, direction); }