Add missing this.block null check

This commit is contained in:
Mononaut 2023-07-13 11:58:29 +09:00
parent ce8630d747
commit e9d22e3b6f

View File

@ -700,7 +700,7 @@ export class BlockComponent implements OnInit, OnDestroy {
}
loadedCacheBlock(block: BlockExtended): void {
if (block.height === this.block.height && block.id !== this.block.id) {
if (this.block && block.height === this.block.height && block.id !== this.block.id) {
this.block.stale = true;
this.block.canonical = block.id;
}