fix undefined dropdown on user logout

pull/3516/head
Rigel Kent 2021-01-14 15:35:03 +01:00
parent 51de2c7ff3
commit 56f0876184
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}