Skip to content

Commit

Permalink
fix(bg/keyAutoAdd): activate only on tab opened for key addition (#849)
Browse files Browse the repository at this point in the history
  • Loading branch information
sidvishnoi authored Jan 20, 2025
1 parent 61801fe commit e42d4e5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/background/services/keyAutoAdd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export class KeyAutoAddService {
const ports = new Set<Runtime.Port>();
const onConnectListener: OnConnectCallback = (port) => {
if (port.name !== CONNECTION_NAME) return;
if (port.sender?.tab && port.sender.tab.id !== tab.id) return;
if (port.error) {
reject(new Error(port.error.message));
return;
Expand Down

0 comments on commit e42d4e5

Please sign in to comment.