mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-30 12:54:31 +01:00
null checks on menu items
This commit is contained in:
parent
68077326b0
commit
ac6a05e53b
@ -74,11 +74,15 @@ export class MenuMain extends BaseMenu {
|
||||
|
||||
updateApplicationMenuState(isAuthenticated: boolean, isLocked: boolean) {
|
||||
this.unlockedRequiredMenuItems.forEach((mi: MenuItem) => {
|
||||
if (mi != null) {
|
||||
mi.enabled = isAuthenticated && !isLocked;
|
||||
}
|
||||
});
|
||||
|
||||
if (this.logOut != null) {
|
||||
this.logOut.enabled = isAuthenticated;
|
||||
}
|
||||
}
|
||||
|
||||
private initApplicationMenu() {
|
||||
const accountSubmenu: MenuItemConstructorOptions[] = [
|
||||
|
Loading…
Reference in New Issue
Block a user