Skip to content

The open source coding agent.

TypeScript

docs: share bugs

Jay V0d2f8e175ad0
diff --git a/packages/web/src/components/Share.tsx b/packages/web/src/components/Share.tsx
index 410fc24e8f2..0671f49f671 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 + "/"