feat: add option to change the default value of the Parse.Query.limit() constraint (#8152)

This commit is contained in:
vzukanov
2022-09-30 01:38:57 +03:00
committed by GitHub
parent b96a4cbdc5
commit 0388956808
10 changed files with 90 additions and 27 deletions

View File

@@ -272,7 +272,7 @@ const calculateSkipAndLimit = (skipInput, first, after, last, before, maxLimit)
}
if ((skip || 0) >= before) {
// If the before index is less then the skip, no objects will be returned
// If the before index is less than the skip, no objects will be returned
limit = 0;
} else if ((!limit && limit !== 0) || (skip || 0) + limit > before) {
// If there is no limit set, the limit is calculated. Or, if the limit (plus skip) is bigger than the before index, the new limit is set.