Fix missing null checks in tx component

This commit is contained in:
Mononaut
2023-04-05 07:11:13 +09:00
parent a3b0c56182
commit ca7c8906a5
2 changed files with 10 additions and 6 deletions

View File

@@ -540,9 +540,13 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
@HostListener('window:resize', ['$event'])
setGraphSize(): void {
this.isMobile = window.innerWidth < 850;
if (this.graphContainer) {
if (this.graphContainer?.nativeElement) {
setTimeout(() => {
this.graphWidth = this.graphContainer.nativeElement.clientWidth;
if (this.graphContainer?.nativeElement) {
this.graphWidth = this.graphContainer.nativeElement.clientWidth;
} else {
setTimeout(() => { this.setGraphSize(); }, 1);
}
}, 1);
}
}