mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
null checks on menu items
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user