mirror of
https://github.com/mempool/mempool.git
synced 2025-02-27 16:46:32 +01:00
fix block height out of range on full page blocks viewer
This commit is contained in:
parent
44021a3cb3
commit
f111c006ce
1 changed files with 5 additions and 1 deletions
|
@ -109,8 +109,12 @@ export class LatestBlocksComponent implements OnInit, OnDestroy {
|
|||
if (this.isLoading) {
|
||||
return;
|
||||
}
|
||||
const height = this.blocks[this.blocks.length - 1].height - 1;
|
||||
if (height < 0) {
|
||||
return;
|
||||
}
|
||||
this.isLoading = true;
|
||||
this.electrsApiService.listBlocks$(this.blocks[this.blocks.length - 1].height - 1)
|
||||
this.electrsApiService.listBlocks$(height)
|
||||
.subscribe((blocks) => {
|
||||
this.blocks = this.blocks.concat(blocks);
|
||||
this.isLoading = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue