Fix URL navigation

This commit is contained in:
Alexis Sellier
2021-03-11 18:43:03 +01:00
parent 8dfe1b0fdc
commit 515fff23bb
+3 -1
View File
@@ -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') {