mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
stripProjectPrefix tweak
This commit is contained in:
1 file changed
+3
-1
@@ -88,7 +88,9 @@ function stripProjectPrefix(path: string, projectId?: string, projectsPath = '/p
|
||||
if (!projectId) return path;
|
||||
|
||||
const projectPrefix = `${projectsPath}/${projectId}/`;
|
||||
if (path.startsWith(projectPrefix)) {
|
||||
if (path === `${projectsPath}/${projectId}`) {
|
||||
return '.';
|
||||
} else if (path.startsWith(projectPrefix)) {
|
||||
return path.slice(projectPrefix.length);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user