mirror of
https://github.com/hexastack/hexabot
synced 2025-01-22 10:35:37 +00:00
fix: resolve pagination-querypipe null checks issues
This commit is contained in:
parent
2910de0058
commit
7322d21721
@ -23,9 +23,10 @@ export class PageQueryPipe<T>
|
||||
let skip: number | undefined = undefined;
|
||||
let limit: number | undefined = undefined;
|
||||
if ('limit' in value) {
|
||||
skip = parseInt(value.skip) > -1 ? parseInt(value.skip) : 0;
|
||||
skip =
|
||||
value?.skip && parseInt(value.skip) > -1 ? parseInt(value.skip) : 0;
|
||||
limit =
|
||||
parseInt(value.limit) > 0
|
||||
value?.limit && parseInt(value.limit) > 0
|
||||
? parseInt(value.limit)
|
||||
: config.pagination.limit;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user