Ver Fonte

ensure db persistent

Tienson Qin há 6 meses atrás
pai
commit
59a0c0c585

+ 1 - 2
deps/outliner/src/logseq/outliner/pipeline.cljs

@@ -228,7 +228,6 @@
                   (keep (fn [b] (d/entity (:db-after refs-tx-report) (:db/id b))) blocks)
                   blocks)
         block-path-refs-tx (distinct (compute-block-path-refs-tx tx-report blocks'))
-        path-refs-tx-report (when (seq block-path-refs-tx)
-                              (ldb/transact! conn block-path-refs-tx {:pipeline-replace? true}))]
+        path-refs-tx-report (ldb/transact! conn block-path-refs-tx {:pipeline-replace? true})]
     {:refs-tx-report refs-tx-report
      :path-refs-tx-export path-refs-tx-report}))

+ 1 - 3
src/main/frontend/worker/pipeline.cljs

@@ -285,9 +285,7 @@
         (or from-disk? new-graph?)
         (let [{:keys [blocks]} (ds-report/get-blocks-and-pages tx-report)
               path-refs (distinct (compute-block-path-refs-tx tx-report blocks))
-              tx-report' (if (seq path-refs)
-                           (ldb/transact! conn path-refs {:pipeline-replace? true})
-                           tx-report)
+              tx-report' (ldb/transact! conn path-refs {:pipeline-replace? true})
               full-tx-data (concat (:tx-data tx-report) (:tx-data tx-report'))
               final-tx-report (assoc tx-report'
                                      :tx-meta (:tx-meta tx-report)