From 515fff23bb808c34864904de25633f222a91c830 Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Thu, 11 Mar 2021 18:43:03 +0100 Subject: [PATCH] Fix URL navigation --- src/App.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App.svelte b/src/App.svelte index 1cb1df4f5..98ccc512c 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -10,7 +10,9 @@ import Register from '@app/base/register/Register.svelte'; import Header from '@app/Header.svelte'; - export let url = "register"; + const defaultPath = "register"; + const path = window.location.pathname; + export let url = path === "/" ? defaultPath : path; function handleKeydown(event) { if (event.key === 'Enter') {