fixed arrow not pointing to genesis block

This commit is contained in:
Antoni Spaanderman 2022-01-20 15:57:53 +01:00
parent e59f610a75
commit 4bf167d3e1
No known key found for this signature in database
GPG Key ID: AE0B68E552E5DF8C

View File

@ -97,7 +97,7 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy {
this.markBlockSubscription = this.stateService.markBlock$ this.markBlockSubscription = this.stateService.markBlock$
.subscribe((state) => { .subscribe((state) => {
this.markHeight = undefined; this.markHeight = undefined;
if (state.blockHeight) { if (state.blockHeight !== undefined) {
this.markHeight = state.blockHeight; this.markHeight = state.blockHeight;
} }
this.moveArrowToPosition(false); this.moveArrowToPosition(false);
@ -114,7 +114,7 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy {
} }
moveArrowToPosition(animate: boolean, newBlockFromLeft = false) { moveArrowToPosition(animate: boolean, newBlockFromLeft = false) {
if (!this.markHeight) { if (this.markHeight === undefined) {
this.arrowVisible = false; this.arrowVisible = false;
return; return;
} }