From 43f937e74cb70d649439ed5e2ab73bba4b425aae Mon Sep 17 00:00:00 2001 From: Richard Park Date: Tue, 15 Oct 2019 18:28:01 +0900 Subject: [PATCH] bug fixed --- .../components/left-sidenav/group.component.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts index b013d799..6939b149 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts @@ -3,7 +3,8 @@ import { OnInit, ViewChild, ViewChildren, - QueryList + QueryList, + OnDestroy } from '@angular/core'; import { Observable, combineLatest, Subscription } from 'rxjs'; @@ -44,7 +45,7 @@ import { KEY_VER_INFO } from '@app/types/ver-info.type'; styleUrls: ['./group.component.scss'], animations: ucapAnimations }) -export class GroupComponent implements OnInit { +export class GroupComponent implements OnInit, OnDestroy { @ViewChild('groupExpansionPanel', { static: true }) groupExpansionPanel: GroupExpansionPanelComponent; @@ -134,6 +135,12 @@ export class GroupComponent implements OnInit { ); } + ngOnDestroy(): void { + if (!!this.loginResSubscription) { + this.loginResSubscription.unsubscribe(); + } + } + async onClickGroupMenu(menuType: string) { this.logger.debug('menuType', menuType); switch (menuType) {