diff --git a/src/base/projects/Blob.svelte b/src/base/projects/Blob.svelte index 9a7909c26..cc756c2e7 100644 --- a/src/base/projects/Blob.svelte +++ b/src/base/projects/Blob.svelte @@ -6,7 +6,7 @@ const lastCommit = blob.info.lastCommit; const lines = (blob.content.match(/\n/g) || []).length; const lineNumbers = Array(lines).fill(0).map((_, index) => (index + 1).toString()); - const parentDir = blob.path.split("/").slice(0, -1).join("/"); + const parentDir = blob.path.match(/^.*\/|/)?.values().next().value;