Add missing this.block null check

This commit is contained in:
Mononaut 2023-07-13 11:58:29 +09:00
parent 1e69ea2f1d
commit eccbcbe53b
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E

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;
}