From e79968fff55885d78bebc98720864c309fd37e88 Mon Sep 17 00:00:00 2001 From: Michal Zielenkiewicz Date: Wed, 2 Nov 2022 11:00:26 +0100 Subject: [PATCH] Remove router hash workaround --- src/utils/webextension.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/utils/webextension.ts b/src/utils/webextension.ts index ee02d060f7..11b4adbaa1 100644 --- a/src/utils/webextension.ts +++ b/src/utils/webextension.ts @@ -9,15 +9,13 @@ const getExtensionUrl = (path: string) => browser.runtime.getURL(`${browser.runtime.getManifest()?.browser_action?.default_popup}${path}`) const openPopup = (path: string, dimensions: Dimensions) => { - // TODO: remove when react hash router is fixed https://github.com/remix-run/react-router/pull/9409 - const fixedPath = `#${path}` - const existingPopupWindow = browser.extension.getViews().find(window => window.location.hash === fixedPath) + const existingPopupWindow = browser.extension.getViews().find(window => window.location.hash === path) if (existingPopupWindow) { existingPopupWindow.close() } browser.windows.create({ - url: getExtensionUrl(fixedPath), + url: getExtensionUrl(path), type: 'popup', width: dimensions.width, height: dimensions.height,