From 83d989f9ad636638bc1e9ee0f2c3a8e3d6609354 Mon Sep 17 00:00:00 2001 From: Alexander Shutau Date: Mon, 10 Jun 2024 22:02:39 +0100 Subject: [PATCH] Fix error message for CWS gallery page --- src/background/tab-manager.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/background/tab-manager.ts b/src/background/tab-manager.ts index 69e117b952bb..4912af5b5609 100644 --- a/src/background/tab-manager.ts +++ b/src/background/tab-manager.ts @@ -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';