1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-06-26 10:36:19 +02: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,10 +74,14 @@ export class MenuMain extends BaseMenu {
updateApplicationMenuState(isAuthenticated: boolean, isLocked: boolean) {
this.unlockedRequiredMenuItems.forEach((mi: MenuItem) => {
mi.enabled = isAuthenticated && !isLocked;
if (mi != null) {
mi.enabled = isAuthenticated && !isLocked;
}
});
this.logOut.enabled = isAuthenticated;
if (this.logOut != null) {
this.logOut.enabled = isAuthenticated;
}
}
private initApplicationMenu() {