Procházet zdrojové kódy

fix(graph-parser): avoid parsing illegal id

Andelf před 3 roky
rodič
revize
333017235b

+ 2 - 1
deps/graph-parser/src/logseq/graph_parser/block.cljc

@@ -431,7 +431,8 @@
   (or (when-let [custom-id (or (get-in properties [:properties :custom-id])
                                (get-in properties [:properties :custom_id])
                                (get-in properties [:properties :id]))]
-        (let [custom-id (and (string? custom-id) (string/trim custom-id))]
+        ;; guard against non-string custom-ids
+        (when-let [custom-id (and (string? custom-id) (string/trim custom-id))]
           (some-> custom-id parse-uuid)))
       (d/squuid)))