[F] Fix file path clicking

This commit is contained in:
Azalea Gui
2023-02-11 17:44:46 -05:00
parent 2beba5b7b9
commit b2e6e71a9f
+1
View File
@@ -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[]