mirror of https://github.com/logseq/logseq
fix: transaction
parent
ea019bcad5
commit
95675269bc
|
@ -83,7 +83,8 @@
|
|||
:block/title :block/body :block/level :block/container :db/other-tx
|
||||
:block/additional-properties)
|
||||
m)) txs)
|
||||
txs (update-block-refs txs opts)]
|
||||
txs (-> (update-block-refs txs opts)
|
||||
(distinct))]
|
||||
(when (and (seq txs)
|
||||
(not (:skip-transact? opts))
|
||||
(not (contains? (:file/unlinked-dirs @state/state)
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
full-opts# (apply merge (reverse o#))
|
||||
opts## (merge (dissoc full-opts# :additional-tx :current-block :nested-transaction?) tx-meta#)]
|
||||
(when (seq all-tx#) ;; If it's empty, do nothing
|
||||
(when-not (:nested-transaction? opts##) ; transact only for the whole transaction
|
||||
(when-not (:nested-transaction? opts#) ; transact only for the whole transaction
|
||||
(let [result# (frontend.modules.outliner.datascript/transact! all-tx# opts## before-editor-cursor#)]
|
||||
{:tx-report result#
|
||||
:tx-data all-tx#
|
||||
|
|
Loading…
Reference in New Issue