1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-07-08 12:35:09 +02:00

null checks on contextMenu

This commit is contained in:
Kyle Spearrin 2018-05-29 23:11:28 -04:00
parent b6b96c33ca
commit 689e7a4999

View File

@ -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;