From 811d195491401c71c9e40d4fd34b2376ecc68398 Mon Sep 17 00:00:00 2001 From: Thomas Beverley Date: Mon, 18 Nov 2024 14:20:38 +0000 Subject: [PATCH] Throw errors as warnings instead of exceptions so we continue execution --- src/extension/contentscript-main-override/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extension/contentscript-main-override/index.ts b/src/extension/contentscript-main-override/index.ts index 703126f..18c2e20 100644 --- a/src/extension/contentscript-main-override/index.ts +++ b/src/extension/contentscript-main-override/index.ts @@ -2,10 +2,10 @@ const genericWindow = window as any if (genericWindow.aibrow) { genericWindow.ai = genericWindow.aibrow } else { - throw new Error('aibrow not found') + console.warn('aibrow not found') } if (genericWindow.aibrowTranslation) { genericWindow.translation = genericWindow.aibrowTranslation } else { - throw new Error('aibrowTranslation not found') + console.warn('aibrowTranslation not found') }