Selaa lähdekoodia

docs: share bugs

Jay V 8 kuukautta sitten
vanhempi
sitoutus
0d2f8e175a
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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 + "/"