mirror of
https://github.com/loewexy/pdnsmanager.git
synced 2025-01-15 18:52:20 +01:00
Fixed infinite loop if no users, no domains, or no records are present
This commit is contained in:
parent
14039932fe
commit
25346304f5
3 changed files with 3 additions and 3 deletions
|
@ -49,7 +49,7 @@ export class DomainsComponent implements OnInit {
|
|||
|
||||
const res = await this.domains.getList(this.pageRequested, this.gs.pageSize, searchStr, sortStr, typeFilter);
|
||||
|
||||
if (res.paging.total < this.pageRequested) {
|
||||
if (res.paging.total < this.pageRequested && res.paging.total > 0) {
|
||||
this.pageRequested = Math.max(1, res.paging.total);
|
||||
await this.loadData();
|
||||
} else {
|
||||
|
|
|
@ -119,7 +119,7 @@ export class EditAuthComponent implements OnInit {
|
|||
const res = await this.records.getListForDomain(this.domainId, this.pageRequested,
|
||||
this.gs.pageSize, queryName, typeFilter, queryContent, sortStr);
|
||||
|
||||
if (res.paging.total < this.pageRequested) {
|
||||
if (res.paging.total < this.pageRequested && res.paging.total > 0) {
|
||||
this.pageRequested = Math.max(1, res.paging.total);
|
||||
await this.loadRecords();
|
||||
} else {
|
||||
|
|
|
@ -49,7 +49,7 @@ export class UsersComponent implements OnInit {
|
|||
|
||||
const res = await this.users.getList(this.pageRequested, this.gs.pageSize, searchStr, sortStr, typeFilter);
|
||||
|
||||
if (res.paging.total < this.pageRequested) {
|
||||
if (res.paging.total < this.pageRequested && res.paging.total > 0) {
|
||||
this.pageRequested = Math.max(1, res.paging.total);
|
||||
await this.loadData();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue