fix: dev check

pull/10016/head
Tienson Qin 2023-06-21 14:49:24 +08:00
parent ad3242b1e4
commit 442f40c0b9
1 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@
(if-let [result (db-validate/broken-page? db-after page-id)]
(do
;; TODO: revert db changes
(when config/dev? (assert (false? result) (str "Broken page: " result)))
(assert (false? result) (str "Broken page: " result))
(reduced false))
true))
true
@ -173,7 +173,7 @@
rs (d/transact! conn txs (assoc opts :outliner/transact? true))
tx-id (get-tx-id rs)]
;; TODO: disable this when db is stable
(validate-db! rs)
(when config/dev? (validate-db! rs))
(state/update-state! :history/tx->editor-cursor
(fn [m] (assoc m tx-id before-editor-cursor)))