fixed arrow not pointing to genesis block

This commit is contained in:
Antoni Spaanderman 2022-01-20 15:57:53 +01:00
parent 8337d123e6
commit 2761eb7b84

View File

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