fix: pasting a first time block ref fails in file graph

This commit is contained in:
Gabriel Horner
2025-04-30 09:31:41 -04:00
parent dcb6c4fb3a
commit eec1184eaa

View File

@@ -2092,7 +2092,7 @@
(cond->> new-content
(not keep-uuid?) (property-file/remove-property-when-file-based repo format "id")
true (property-file/remove-property-when-file-based repo format "custom_id"))]
(merge (apply dissoc block (conj (when-not keep-uuid? [:block/_refs]) :block/pre-block? :block/meta))
(merge (apply dissoc block (conj (if-not keep-uuid? [:block/_refs] []) :block/pre-block? :block/meta))
(cond->
{:block/page {:db/id (:db/id page)}
:block/title new-content}