mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
null checks on contextMenu
This commit is contained in:
@@ -54,6 +54,9 @@ export class MessagingMain {
|
||||
}
|
||||
|
||||
private updateTrayMenu(isAuthenticated: boolean, isLocked: boolean) {
|
||||
if (this.main.trayMain == null || this.main.trayMain.contextMenu == null) {
|
||||
return;
|
||||
}
|
||||
const lockNowTrayMenuItem = this.main.trayMain.contextMenu.getMenuItemById('lockNow');
|
||||
if (lockNowTrayMenuItem != null) {
|
||||
lockNowTrayMenuItem.enabled = isAuthenticated && !isLocked;
|
||||
|
||||
Reference in New Issue
Block a user