Browse Source

fix: write files only if it's a file-based graph

Tienson Qin 1 năm trước cách đây
mục cha
commit
2545d15a5e

+ 2 - 1
src/main/frontend/worker/file.cljs

@@ -124,5 +124,6 @@
                               (let [repo (ffirst col)
                               (let [repo (ffirst col)
                                     conn (worker-state/get-datascript-conn repo)]
                                     conn (worker-state/get-datascript-conn repo)]
                                 (if conn
                                 (if conn
-                                  (write-files! conn col (worker-state/get-context))
+                                  (when-not (ldb/db-based-graph? @conn)
+                                    (write-files! conn col (worker-state/get-context)))
                                   (js/console.error (str "DB is not found for ") repo)))))))
                                   (js/console.error (str "DB is not found for ") repo)))))))