mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-21 21:11:35 +01:00
null checks on contextMenu
This commit is contained in:
parent
b6b96c33ca
commit
689e7a4999
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user