Skip to content

Commit

Permalink
Fix pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazar Usov authored and Nazar Usov committed Sep 18, 2024
1 parent 1e21989 commit e6ca96d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion html_source/src/app/store/pagination/pagination.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e6ca96d

Please sign in to comment.