We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 28ba215 + b9c6dca commit 8a34ec6Copy full SHA for 8a34ec6
src/utils/sanitizeParams.ts
@@ -106,7 +106,7 @@ export default async function sanitizeParams(
106
// When using secondary sort (paginatedField !== '_id'), we need _id for cursor encoding.
107
// Cursors are encoded as [paginatedFieldValue, _id] tuples (see encodePaginationTokens in query.ts).
108
// Without _id, the cursor would be encoded as a string, breaking pagination on subsequent pages.
109
- if (shouldSecondarySortOnId && params.fields._id === 0) {
+ if (shouldSecondarySortOnId && !params.fields._id) {
110
params.fields._id = 1;
111
}
112
0 commit comments