From 8415a63a76d1f138e31e0c25f16412d357a8c164 Mon Sep 17 00:00:00 2001 From: kvhnuke <10602065+kvhnuke@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:19:47 -0700 Subject: [PATCH] fix: background double init --- packages/extension-bridge/src/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/extension-bridge/src/utils.ts b/packages/extension-bridge/src/utils.ts index d98a024ab..fc6e87f64 100644 --- a/packages/extension-bridge/src/utils.ts +++ b/packages/extension-bridge/src/utils.ts @@ -36,7 +36,10 @@ export const getBackgroundPageType = (): RuntimeContext => { const url = new URL(browser.runtime.getURL(manifest.options_ui.page)); if (url.pathname === window.location.pathname) return "options"; } - if (window?.location?.pathname === "/index.html") { + if ( + window?.location?.pathname === "/index.html" || + window?.location?.pathname === "/onboard.html" + ) { return "new-window"; } return "background";