Fixing undefined error

This commit is contained in:
softsimon 2024-03-17 15:31:17 +09:00
parent 1c76a6091a
commit df107d34b4
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

View File

@ -114,7 +114,7 @@ export class BlocksList implements OnInit {
this.lastPage = this.page;
return blocks[0];
}
if (blocks[1]) {
if (blocks[1] && blocks[1].length) {
this.blocksCount = Math.max(this.blocksCount, blocks[1][0].height) + 1;
if (this.isMempoolModule) {
// @ts-ignore: Need to add an extra field for the template