diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index d35d7b44f9..2cfff4b814 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -1147,7 +1147,7 @@ (let [dom-blocks (remove (fn [block] (= "true" (dom/attr block "data-query"))) blocks)] (when (seq dom-blocks) (let [repo (state/get-current-repo) - block-uuids (distinct (map #(uuid (dom/attr % "blockid")) dom-blocks)) + block-uuids (distinct (keep #(when-let [id (dom/attr % "blockid")] (uuid id)) dom-blocks)) lookup-refs (map (fn [id] [:block/uuid id]) block-uuids) blocks (map db/entity lookup-refs)] (ui-outliner-tx/transact!