Skip to content

Commit 43b3eb2

Browse files
Address critical claude code bot suggestions
1 parent 0357842 commit 43b3eb2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export class AddEditV2Component implements OnInit, OnDestroy {
220220

221221
ngOnDestroy() {
222222
if (this.messageListener) {
223-
chrome.runtime.onMessage.removeListener(this.messageListener);
223+
BrowserApi.removeListener(chrome.runtime.onMessage, this.messageListener);
224224
}
225225
}
226226

apps/browser/src/vault/popup/utils/vault-popout-window.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,6 @@ async function openAddEditVaultItemPopout(
9797
let singleActionKey = VaultPopoutType.addEditVaultItem;
9898
let addEditCipherUrl = "popup/index.html#/edit-cipher";
9999
let queryParamToken = "?";
100-
const extensionUrl = chrome.runtime.getURL("popup/index.html");
101-
const existingPopupTabs = await BrowserApi.tabsQuery({ url: `${extensionUrl}*` });
102-
const existingPopup = existingPopupTabs.find((tab) =>
103-
tab.url?.includes(`singleActionPopout=${singleActionKey}`),
104-
);
105100
const formatQueryString = (key: string, value: string) => {
106101
const queryString = `${queryParamToken}${key}=${value}`;
107102
queryParamToken = "&";
@@ -120,6 +115,11 @@ async function openAddEditVaultItemPopout(
120115
addEditCipherUrl += formatQueryString("uri", url);
121116
}
122117

118+
const extensionUrl = chrome.runtime.getURL("popup/index.html");
119+
const existingPopupTabs = await BrowserApi.tabsQuery({ url: `${extensionUrl}*` });
120+
const existingPopup = existingPopupTabs.find((tab) =>
121+
tab.url?.includes(`singleActionPopout=${singleActionKey}`),
122+
);
123123
// Check if the an existing popup is already open
124124
if (existingPopup) {
125125
await chrome.runtime.sendMessage({

0 commit comments

Comments
 (0)