From b2e6e71a9f1bafd919b0fdd67bc474aa70d08fd9 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Sat, 11 Feb 2023 17:44:46 -0500 Subject: [PATCH] [F] Fix file path clicking --- src/App.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/App.tsx b/src/App.tsx index 660f1e0..7e60afd 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -30,6 +30,7 @@ if (host.includes("-PLACEHOLDER")) host = "https://daisy.hydev.org/data/api" // Compute path let fullPath = window.location.pathname let filePath = fullPath.startsWith(deployPath) ? fullPath.substring(deployPath.length) : fullPath +if (!filePath.startsWith('/')) filePath = `/${filePath}` const fetchApi = async () => await (await fetch(urlJoin(host, filePath))).json() as File[]