From 2e7393853447d2da41ddef79f73e9026719a674b Mon Sep 17 00:00:00 2001 From: Richard van Heuven van Staereling Date: Wed, 7 Jun 2023 23:36:59 +0200 Subject: [PATCH] fix: incorrectly return totalDocs=1 instead of the correct count when pagination=false --- src/collections/operations/find.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/collections/operations/find.ts b/src/collections/operations/find.ts index 6a119fbcca..a504836c0b 100644 --- a/src/collections/operations/find.ts +++ b/src/collections/operations/find.ts @@ -134,7 +134,6 @@ async function find>( leanWithId: true, useEstimatedCount, pagination: usePagination, - useCustomCountFn: pagination ? undefined : () => Promise.resolve(1), options: { // limit must also be set here, it's ignored when pagination is false limit: limitToUse,