diff --git a/src/net/deertopia/doerg/roam.clj b/src/net/deertopia/doerg/roam.clj index b0b38ee..f34c5eb 100644 --- a/src/net/deertopia/doerg/roam.clj +++ b/src/net/deertopia/doerg/roam.clj @@ -133,11 +133,11 @@ elisp/read-alist))) (defn public? [node] - (-> node properties (get "DEERTOPIAVISIBILITY") (= "public"))) + (some-> (properties node) (get "DEERTOPIAVISIBILITY") (= "public"))) (defn graph-visible? [node] (#{"public" "graphonly"} - (-> node properties (get "DEERTOPIAVISIBILITY")))) + (some-> (properties node) (get "DEERTOPIAVISIBILITY")))) (defn backlinks "Returns a collection of nodes linking to `node`." @@ -149,7 +149,8 @@ where links.dest = ?" (elisp/print (str (:id node)))]) :let [id' (elisp/read-string id)] - :when (-> id' parse-uuid get-node public?)] + :when (some-> (-> id' parse-uuid get-node) + public?)] (make-node id' {:title (elisp/read-string title)})))