mirror of
https://github.com/logseq/logseq.git
synced 2026-05-29 15:09:41 +00:00
fix: transaction
This commit is contained in:
@@ -85,7 +85,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))
|
||||
(if (react/db-graph? repo)
|
||||
|
||||
@@ -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#
|
||||
|
||||
Reference in New Issue
Block a user