1
0
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:
Kyle Spearrin 2019-03-12 16:08:14 -04:00
parent 68077326b0
commit ac6a05e53b

View File

@ -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[] = [