Browse Source

fix: avoid [:block/uuid nil] err when transact

rcmerci 1 year ago
parent
commit
6fa4048299
1 changed files with 4 additions and 1 deletions
  1. 4 1
      deps/outliner/src/logseq/outliner/core.cljs

+ 4 - 1
deps/outliner/src/logseq/outliner/core.cljs

@@ -397,7 +397,10 @@
               (update m :block/tags (fn [tags]
                                       (->>
                                        (concat (map :db/id (:block/tags block-entity))
-                                               (map (fn [t] (or (:db/id t) [:block/uuid (:block/uuid t)])) tags))
+                                               (map (fn [t] (or (:db/id t)
+                                                                (some->> (:block/uuid t)
+                                                                         (partial vector :block/uuid))))
+                                                    tags))
                                        (remove nil?))))
               m)]