Преглед на файлове

fix: schema graph can't create a node value because of call stack

fixes
https://linear.app/logseq/issue/LOG-3258/schema-graph-cant-create-a-node-property-value-because-of-call-stack.

Datascript doesn't support transacting entities yet.
Tienson Qin преди 1 година
родител
ревизия
030da4af35
променени са 1 файла, в които са добавени 10 реда и са изтрити 3 реда
  1. 10 3
      src/main/frontend/worker/handler/page/db_based/page.cljs

+ 10 - 3
src/main/frontend/worker/handler/page/db_based/page.cljs

@@ -26,9 +26,16 @@
                   (update :block/tags
                           (fnil into [])
                           (mapv (fn [tag]
-                                  (if (uuid? tag)
-                                    (d/entity @conn [:block/uuid tag])
-                                    tag))
+                                  (let [v (if (uuid? tag)
+                                            (d/entity @conn [:block/uuid tag])
+                                            tag)]
+                                    (cond
+                                      (de/entity? v)
+                                      (:db/id v)
+                                      (map? v)
+                                      (:db/id v)
+                                      :else
+                                      v)))
                                 tags)))
           property-vals-tx-m
           ;; Builds property values for built-in properties like logseq.property.pdf/file