Explorar el Código

docs: share bugs

Jay V hace 8 meses
padre
commit
0d2f8e175a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/web/src/components/Share.tsx

+ 1 - 1
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 + "/"