From 13cd4f7d921c8c261e0ccdc31d74e5e21aa580d6 Mon Sep 17 00:00:00 2001 From: Dawid Urbas Date: Thu, 18 Jul 2024 15:25:47 +0200 Subject: [PATCH] error handling --- holo-key-manager-extension/scripts/background.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/holo-key-manager-extension/scripts/background.ts b/holo-key-manager-extension/scripts/background.ts index 2e00898..987c627 100644 --- a/holo-key-manager-extension/scripts/background.ts +++ b/holo-key-manager-extension/scripts/background.ts @@ -65,6 +65,10 @@ const createOrUpdateWindow = ( const onWindowCreated = (newWindow: chrome.windows.Window | undefined) => { console.log(3); console.log('newWindow', newWindow); + if (chrome.runtime.lastError) { + console.error('Window creation error:', chrome.runtime.lastError); + } + if (!newWindow) return; windowId = newWindow.id; chrome.windows.onRemoved.addListener((id) => {