From 45a3e6bf2f3115597670c167688ffca9ef5732bf Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Mon, 30 Oct 2023 20:43:02 +0800 Subject: [PATCH] enhance: make sure property value refs are existed blocks --- src/main/frontend/modules/outliner/core.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/frontend/modules/outliner/core.cljs b/src/main/frontend/modules/outliner/core.cljs index c76fbb0dd3..3f5eaf0dfa 100644 --- a/src/main/frontend/modules/outliner/core.cljs +++ b/src/main/frontend/modules/outliner/core.cljs @@ -202,7 +202,8 @@ :else nil)))) property-refs (->> (concat property-key-refs property-value-refs) - (map (fn [id-or-map] (if (uuid? id-or-map) {:block/uuid id-or-map} id-or-map)))) + (map (fn [id-or-map] (if (uuid? id-or-map) {:block/uuid id-or-map} id-or-map))) + (remove (fn [b] (nil? (db/entity [:block/uuid (:block/uuid b)]))))) content-refs (when-not skip-content-parsing? (some-> (:block/content block) block/extract-refs-from-text))] (concat property-refs content-refs)))