From eb7c8d5bfd940a606ba2f6e3c178ca4defe5eb49 Mon Sep 17 00:00:00 2001 From: Naitikk Date: Fri, 17 Apr 2026 13:16:51 +0530 Subject: [PATCH] fix: correct sort length access in applyQueryOptions --- apps/meteor/client/lib/cachedStores/applyQueryOptions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }