Browse Source

Fix custom.css not opening from settings

Gabriel Horner 2 years ago
parent
commit
d647cd7107
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/main/frontend/config.cljs

+ 5 - 3
src/main/frontend/config.cljs

@@ -458,8 +458,10 @@
   ([]
    (get-custom-css-path (state/get-current-repo)))
   ([repo]
-   (when-let [repo-dir (get-repo-dir repo)]
-     (path/path-join repo-dir app-name custom-css-file))))
+   (if (db-based-graph? repo)
+     (path/path-join app-name custom-css-file)
+     (when-let [repo-dir (get-repo-dir repo)]
+       (path/path-join repo-dir app-name custom-css-file)))))
 
 (defn get-export-css-path
   ([]
@@ -494,7 +496,7 @@
    (get-custom-js-path (state/get-current-repo)))
   ([repo]
    (if (db-based-graph? repo)
-     (str app-name "/" custom-js-file)
+     (path/path-join app-name custom-js-file)
      (when-let [repo-dir (get-repo-dir repo)]
        (path/path-join repo-dir app-name custom-js-file)))))