Skip to content

Commit 9d62261

Browse files
committed
Fix context menu for non-highlighted tabs
1 parent a338356 commit 9d62261

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/ts/background/BrowserTabContextMenu.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@ export async function init() {
3434

3535
console.assert(selection.length >= 1);
3636

37-
if(!selection.find(t => t.id === tab.id)) {
38-
console.error(`[TA] Unexpected tab selection`, selection);
39-
return;
37+
if(selection.find(t => t.id === tab.id)) {
38+
createMenuForTabs(selection);
39+
} else {
40+
createMenuForTabs([tab]);
4041
}
41-
42-
createMenuForTabs(selection);
4342
}
4443
});
4544

0 commit comments

Comments
 (0)