Browse Source

fix: UI crashes on file graph while typing in tag autocomplete

This happens shortly after loading the app on today's journal
Gabriel Horner 1 year ago
parent
commit
748a5d6195
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/main/frontend/components/editor.cljs

+ 2 - 2
src/main/frontend/components/editor.cljs

@@ -180,8 +180,8 @@
                              [:div (ui/icon "whiteboard" {:extension? true})]
                              (db/page? block)
                              [:div (ui/icon "page" {:extension? true})]
-                             (or (string/starts-with? (:block/title block) (t :new-tag))
-                                 (string/starts-with? (:block/title block) (t :new-page)))
+                             (or (string/starts-with? (str (:block/title block)) (t :new-tag))
+                                 (string/starts-with? (str (:block/title block)) (t :new-page)))
                              nil
                              :else
                              [:div (ui/icon "letter-n" {:size 14})]))