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