From 15e80abd95105a03d2b833d7253fc94e2805fd73 Mon Sep 17 00:00:00 2001 From: vvandenb Date: Thu, 23 Mar 2023 21:18:44 +0100 Subject: [PATCH] * Fixed first profile appearance SPA --- front/src/App.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/front/src/App.svelte b/front/src/App.svelte index 31d7b3b..7ce8bbc 100644 --- a/front/src/App.svelte +++ b/front/src/App.svelte @@ -88,8 +88,10 @@ } onMount(() => { - if (window.location.pathname === "/profile") + if (window.location.pathname === "/profile") { appState = APPSTATE.PROFILE; + history.replaceState({ appState: "/profile" }, "", "/profile"); + } else history.replaceState({ appState: "" }, "", "/"); window.onpopstate = (e: PopStateEvent) => {