All setIntervals on the frontend are now properly destroyed

This commit is contained in:
Isaac Abadi
2022-05-01 23:23:19 -04:00
parent 8a323f028d
commit 88c16d7195
3 changed files with 9 additions and 1 deletions

View File

@@ -33,7 +33,8 @@ export class TwitchChatComponent implements OnInit, AfterViewInit {
this.getFullChat();
}
ngAfterViewInit() {
ngOnDestroy(): void {
if (this.chat_check_interval_obj) { clearInterval(this.chat_check_interval_obj); }
}
private isUserNearBottom(): boolean {