diff --git a/spot/entrypoints/background.ts b/spot/entrypoints/background.ts index b393ca570..8dbc6e8bf 100644 --- a/spot/entrypoints/background.ts +++ b/spot/entrypoints/background.ts @@ -965,13 +965,11 @@ export default defineBackground(() => { (c: { contextType: string }) => c.contextType === "OFFSCREEN_DOCUMENT", ); if (offscreenDocument) { - return; - // TODO: check manifestv3 for reloading context - // try { - // await browser.offscreen.closeDocument(); - // } catch (e) { - // console.trace(e) - // } + try { + await browser.offscreen.closeDocument(); + } catch (e) { + console.error("Spot: error closing old offscreen document", e); + } } try {