Skip to content

Commit

Permalink
Fix error message for CWS gallery page
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderby committed Jun 10, 2024
1 parent 3886f8e commit 83d989f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/background/tab-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,12 @@ export default class TabManager {
func: () => window.location.href,
}))[0].result || 'about:blank';
} catch (e) {
if (String(e).includes('chrome://')) {
const errMessage = String(e);
if (
errMessage.includes('chrome://') ||
errMessage.includes('chrome-extension://') ||
errMessage.includes('gallery')
) {
return 'chrome://protected';
}
return 'about:blank';
Expand Down

0 comments on commit 83d989f

Please sign in to comment.