Browse Source

fix: block should save with selected tag

While selecting an existing tag, block were saving with a tag that had
characters cutoff from the end
e.g. Drug_Class -> Drug_C or Comment_Class -> Comment_Cl
Gabriel Horner 2 years ago
parent
commit
49069e1998
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main/frontend/handler/page.cljs

+ 1 - 1
src/main/frontend/handler/page.cljs

@@ -219,7 +219,7 @@
                                q))
               last-pattern (str "#" (when wrapped? page-ref/left-brackets) last-pattern)]
           (when (config/db-based-graph? (state/get-current-repo))
-            (let [tag (string/trim q)
+            (let [tag (string/trim chosen)
                   edit-block (state/get-edit-block)]
               (when (and (not (string/blank? tag)) (:block/uuid edit-block))
                 (let [tag-entity (db/entity [:block/name (util/page-name-sanity-lc tag)])]