1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-24 16:49:26 +01:00

self ref unnecessary

This commit is contained in:
Kyle Spearrin 2017-12-06 14:09:05 -05:00
parent a5add2c6f9
commit 5319568d81

View File

@ -420,19 +420,18 @@ export default class MainBackground {
return;
}
const self = this;
const tab = await this.tabsQueryFirst({ active: true, windowId: chrome.windows.WINDOW_ID_CURRENT });
if (!tab) {
return;
}
const disabled = await self.utilsService.getObjFromStorage<boolean>(ConstantsService.disableContextMenuItemKey);
const disabled = await this.utilsService.getObjFromStorage<boolean>(ConstantsService.disableContextMenuItemKey);
if (!disabled) {
await this.buildContextMenu();
this.contextMenuReady(tab, true);
} else {
await this.contextMenusRemoveAll();
self.contextMenuReady(tab, false);
this.contextMenuReady(tab, false);
}
}