Global Search, limit 0 is no limit

This commit is contained in:
Martin Filser 2023-02-27 21:50:36 +01:00
parent 6938cec583
commit 1f57a3f62e
2 changed files with 7 additions and 2 deletions

View file

@ -540,12 +540,15 @@ export class Query {
}
} else if (operator === OPERATOR_LIMIT) {
const limit = parseInt(value, 10);
if (isNaN(limit) || limit < 1) {
if (isNaN(limit) || limit < 0) {
this.addError(OPERATOR_LIMIT, {
tag: 'operator-limit-invalid',
value,
});
continue;
} else if (limit == 0) {
// no limit
continue;
} else {
value = limit;
}