« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/write/build-modes/live-dev-server.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/write/build-modes/live-dev-server.js')
-rw-r--r--src/write/build-modes/live-dev-server.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js
index 464e689d..91ed4ee3 100644
--- a/src/write/build-modes/live-dev-server.js
+++ b/src/write/build-modes/live-dev-server.js
@@ -225,10 +225,10 @@ export async function go({
 
     const matchedWebRoute =
       webRoutes
-        .find(({to}) => pathname.startsWith(to));
+        .find(({to}) => pathname.startsWith('/' + to));
 
     if (matchedWebRoute) {
-      const localFilePath = pathname.slice(matchedWebRoute.to.length);
+      const localFilePath = pathname.slice(1 + matchedWebRoute.to.length);
 
       // Not security tested, man, this is a dev server!!
       const safePath =