Commit 025cbb8
committed
fix: also wrap menus.mjs openSidePanel call in try/catch
contextMenus.onClicked.tab is optional per the Chrome API ('If the
click did not take place in a tab, this parameter will be missing').
The openSidePanel action dereferences tab.windowId/tab.id, so it can
throw synchronously, which the existing .catch() Promise handler
would not catch. Mirror the pattern already used in
src/background/commands.mjs by wrapping the call in try/catch.
Addresses devin-ai-integration[bot] review on src/background/menus.mjs:23.1 parent 0f82ecd commit 025cbb8
1 file changed
Lines changed: 11 additions & 1 deletion
File tree
- src/background
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
19 | 29 | | |
20 | 30 | | |
21 | 31 | | |
| |||
0 commit comments