mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-28 12:35:40 +01:00
null checks on menu items
This commit is contained in:
parent
68077326b0
commit
ac6a05e53b
@ -74,10 +74,14 @@ export class MenuMain extends BaseMenu {
|
|||||||
|
|
||||||
updateApplicationMenuState(isAuthenticated: boolean, isLocked: boolean) {
|
updateApplicationMenuState(isAuthenticated: boolean, isLocked: boolean) {
|
||||||
this.unlockedRequiredMenuItems.forEach((mi: MenuItem) => {
|
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() {
|
private initApplicationMenu() {
|
||||||
|
Loading…
Reference in New Issue
Block a user