From 56f0876184a792cff3c6123c95d9e52eaa450a28 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Thu, 14 Jan 2021 15:35:03 +0100 Subject: fix undefined dropdown on user logout --- client/src/app/menu/menu.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/src') diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts index 50ff0e2b3..ed20d9c01 100644 --- a/client/src/app/menu/menu.component.ts +++ b/client/src/app/menu/menu.component.ts @@ -228,7 +228,7 @@ export class MenuComponent implements OnInit { // Close dropdown when window scroll to avoid dropdown quick jump for re-position const onWindowScroll = () => { - this.dropdown.close() + this.dropdown?.close() window.removeEventListener('scroll', onWindowScroll) } -- cgit v1.2.3