Skip to content

Commit

Permalink
Correctly report errors in Chrome
Browse files Browse the repository at this point in the history
Fixes #16
  • Loading branch information
fregante committed Jan 23, 2021
1 parent a78f6cc commit c2743d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async function handleClick(
executeCode(
tab.id,
'alert' /* Can't pass a raw native function */,
String(error)
String(error instanceof Error ? error : new Error(error.message))
).catch(() => {
alert(error); // One last attempt
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"dependencies": {
"webext-additional-permissions": "^2.0.0",
"webext-polyfill-kinda": "^0.0.1"
"webext-polyfill-kinda": "^0.0.2"
},
"devDependencies": {
"@sindresorhus/tsconfig": "^0.8.0",
Expand Down

0 comments on commit c2743d1

Please sign in to comment.