Skip to content

Commit

Permalink
error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mrruby committed Jul 18, 2024
1 parent 1b2d925 commit 13cd4f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions holo-key-manager-extension/scripts/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 13cd4f7

Please sign in to comment.