From 05e23b058c210235786b8a3d9307e0f8cfba0619 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Fri, 27 Jan 2023 20:01:31 -0600 Subject: [PATCH] Fix navigation-breaking js error on liquid block page --- .../src/app/components/block/block.component.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/components/block/block.component.ts b/frontend/src/app/components/block/block.component.ts index 05c5db41a..f1ebfed6a 100644 --- a/frontend/src/app/components/block/block.component.ts +++ b/frontend/src/app/components/block/block.component.ts @@ -439,17 +439,17 @@ export class BlockComponent implements OnInit, OnDestroy { ngOnDestroy() { this.stateService.markBlock$.next({}); - this.transactionSubscription.unsubscribe(); + this.transactionSubscription?.unsubscribe(); this.overviewSubscription?.unsubscribe(); this.auditSubscription?.unsubscribe(); - this.keyNavigationSubscription.unsubscribe(); - this.blocksSubscription.unsubscribe(); - this.networkChangedSubscription.unsubscribe(); - this.queryParamsSubscription.unsubscribe(); - this.timeLtrSubscription.unsubscribe(); - this.auditSubscription.unsubscribe(); + this.keyNavigationSubscription?.unsubscribe(); + this.blocksSubscription?.unsubscribe(); + this.networkChangedSubscription?.unsubscribe(); + this.queryParamsSubscription?.unsubscribe(); + this.timeLtrSubscription?.unsubscribe(); + this.auditSubscription?.unsubscribe(); this.unsubscribeNextBlockSubscriptions(); - this.childChangeSubscription.unsubscribe(); + this.childChangeSubscription?.unsubscribe(); } unsubscribeNextBlockSubscriptions() {