local: fix custom index

This commit is contained in:
CanadaHonk 2023-02-09 18:29:36 +00:00
parent c2f914314a
commit d7c7412b6c

View File

@ -14,7 +14,7 @@ export default (givenPath, csp) => {
if (!csp) csp = undefined;
const basePath = extname(givenPath) ? dirname(givenPath) : givenPath;
const indexFile = extname(basePath) ? basename(basePath) : 'index.html';
const indexFile = extname(givenPath) ? basename(givenPath) : 'index.html';
return async url => {
url = new URL(url);