mirror of https://github.com/logseq/logseq
parent
0724cbe4b9
commit
aa029dfe0d
|
@ -1,5 +1,6 @@
|
|||
(ns frontend.db.outliner
|
||||
(:require [datascript.core :as d]
|
||||
[frontend.db :as db]
|
||||
[frontend.db.react :as react]
|
||||
[frontend.util :as util]
|
||||
[frontend.debug :as debug]
|
||||
|
@ -54,3 +55,7 @@
|
|||
[?a :block/journal? true]]
|
||||
@conn)]
|
||||
(flatten r)))
|
||||
|
||||
(defn remove-non-existed-refs!
|
||||
[refs]
|
||||
(filter db/entity refs))
|
||||
|
|
|
@ -130,6 +130,7 @@
|
|||
(let [m (-> (:data this)
|
||||
(dissoc :block/children :block/dummy? :block/meta)
|
||||
(util/remove-nils))
|
||||
m (update m :block/refs db-outliner/remove-non-existed-refs!)
|
||||
other-tx (:db/other-tx m)]
|
||||
(when (seq other-tx)
|
||||
(swap! txs-state (fn [txs]
|
||||
|
|
Loading…
Reference in New Issue