summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/web/src/components/Share.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/web/src/components/Share.tsx b/packages/web/src/components/Share.tsx
index 410fc24e8..0671f49f6 100644
--- a/packages/web/src/components/Share.tsx
+++ b/packages/web/src/components/Share.tsx
@@ -86,7 +86,7 @@ function scrollToAnchor(id: string) {
}
function stripWorkingDirectory(filePath: string, workingDir?: string) {
- if (workingDir === undefined) return filePath
+ if (filePath === undefined || workingDir === undefined) return filePath
const prefix = workingDir.endsWith("/") ? workingDir : workingDir + "/"