mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-12 19:50:46 +01:00
self ref unnecessary
This commit is contained in:
parent
a5add2c6f9
commit
5319568d81
@ -420,19 +420,18 @@ export default class MainBackground {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const self = this;
|
|
||||||
const tab = await this.tabsQueryFirst({ active: true, windowId: chrome.windows.WINDOW_ID_CURRENT });
|
const tab = await this.tabsQueryFirst({ active: true, windowId: chrome.windows.WINDOW_ID_CURRENT });
|
||||||
if (!tab) {
|
if (!tab) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const disabled = await self.utilsService.getObjFromStorage<boolean>(ConstantsService.disableContextMenuItemKey);
|
const disabled = await this.utilsService.getObjFromStorage<boolean>(ConstantsService.disableContextMenuItemKey);
|
||||||
if (!disabled) {
|
if (!disabled) {
|
||||||
await this.buildContextMenu();
|
await this.buildContextMenu();
|
||||||
this.contextMenuReady(tab, true);
|
this.contextMenuReady(tab, true);
|
||||||
} else {
|
} else {
|
||||||
await this.contextMenusRemoveAll();
|
await this.contextMenusRemoveAll();
|
||||||
self.contextMenuReady(tab, false);
|
this.contextMenuReady(tab, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user