From e6ca96d04cff39d43168c21953e0678fb7827298 Mon Sep 17 00:00:00 2001 From: Nazar Usov Date: Wed, 18 Sep 2024 15:08:23 +0300 Subject: [PATCH] Fix pagination --- html_source/src/app/store/pagination/pagination.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html_source/src/app/store/pagination/pagination.service.ts b/html_source/src/app/store/pagination/pagination.service.ts index 0299455d..9512012e 100644 --- a/html_source/src/app/store/pagination/pagination.service.ts +++ b/html_source/src/app/store/pagination/pagination.service.ts @@ -71,7 +71,7 @@ export class PaginationService { .fill(1) .map((value, index) => value + index)); } else if (this.variables.currentWallet.restore) { - this.variables.currentWallet.totalPages = Math.ceil((data.history.length ?? 0) / this.variables.count); + this.variables.currentWallet.totalPages = Math.ceil((data.history?.length ?? 0) / this.variables.count); this.variables.currentWallet.totalPages > this.variables.maxPages ? (this.variables.currentWallet.pages = new Array(5).fill(1).map((value, index) => value + index)) : (this.variables.currentWallet.pages = new Array(this.variables.currentWallet.totalPages)