Browse Source

fix(fs): path-join testcase

Andelf 2 years ago
parent
commit
3069f5d7e3
1 changed files with 2 additions and 1 deletions
  1. 2 1
      deps/common/src/logseq/common/path.cljs

+ 2 - 1
deps/common/src/logseq/common/path.cljs

@@ -169,7 +169,8 @@
   (if (is-file-url? base)
     (apply url-join base segments)
     (let [rejoined-path (apply path-join-internal base segments)]
-      (if (string/starts-with? base "//") ;; Win path fix
+      (if (and (not-empty base)
+               (string/starts-with? base "//")) ;; Win path fix
         (str "/" rejoined-path)
         rejoined-path))))