fix: strip root /
This commit is contained in:
parent
ad68d92c57
commit
165ead6a80
|
@ -49,6 +49,9 @@ export default class S5Provider implements ContentProvider {
|
||||||
}
|
}
|
||||||
file = meta.paths[urlPath];
|
file = meta.paths[urlPath];
|
||||||
} else {
|
} else {
|
||||||
|
if (urlPath.startsWith("/")) {
|
||||||
|
urlPath = urlPath.substring(1);
|
||||||
|
}
|
||||||
if (!(urlPath in meta.paths)) {
|
if (!(urlPath in meta.paths)) {
|
||||||
throw new Error("404");
|
throw new Error("404");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue