From ee3f00858acfe72b555a82f0eb3f902fc9d00294 Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Wed, 6 Oct 2021 17:55:19 +0200 Subject: [PATCH] Move app history replace to happen only if not in plugin legacy mode (#1466) --- webapp/src/app.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/webapp/src/app.tsx b/webapp/src/app.tsx index dc4b42cc8..4fb43987a 100644 --- a/webapp/src/app.tsx +++ b/webapp/src/app.tsx @@ -93,11 +93,14 @@ const App = React.memo((): JSX.Element => { dispatch(fetchLanguage()) dispatch(fetchMe()) dispatch(fetchClientConfig()) - if (Utils.isFocalboardPlugin()) { - history.replace(window.location.pathname.replace((window as any).frontendBaseURL, '')) - } }, []) + if (Utils.isFocalboardPlugin()) { + useEffect(() => { + history.replace(window.location.pathname.replace((window as any).frontendBaseURL, '')) + }, []) + } + if (!inPluginLegacy) { useEffect(() => { wsClient.open()