fix: allows for limit bypass on version find operations

This commit is contained in:
Jarrod Flesch
2022-12-01 10:44:11 -05:00
parent c8d1b9f88a
commit 891f00d05c
2 changed files with 2 additions and 2 deletions

View File

@@ -100,7 +100,7 @@ async function findVersions<T extends TypeWithVersion<T> = any>(args: Arguments)
const paginatedDocs = await VersionsModel.paginate(query, {
page: page || 1,
limit: limit || 10,
limit: limit ?? 10,
sort: {
[sortProperty]: sortOrder,
},

View File

@@ -98,7 +98,7 @@ async function findVersions<T extends TypeWithVersion<T> = any>(args: Arguments)
const paginatedDocs = await VersionsModel.paginate(query, {
page: page || 1,
limit: limit || 10,
limit: limit ?? 10,
sort: {
[sortProperty]: sortOrder,
},