diff --git a/src/main.ts b/src/main.ts index 6316ccd..3faebab 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,9 +1,13 @@ -if (location.pathname === import.meta.env.BASE_URL + "/waybar") { +const pathname = location.pathname.endsWith("/") + ? location.pathname.slice(0, -1) + : location.pathname; + +if (pathname === import.meta.env.BASE_URL + "/waybar") { import("./routes/waybar/waybar").then(({ createWaybarPage }) => createWaybarPage() ); } -if (location.pathname === import.meta.env.BASE_URL) { +if (pathname === import.meta.env.BASE_URL) { import("./routes/root/root").then(({ createRootPage }) => createRootPage()); }