소스 검색

fix(api): incorrect lowercase for the qulified property key

charlie 5 달 전
부모
커밋
e489e93614
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      src/main/logseq/api.cljs
  2. 3 1
      src/main/logseq/api/block.cljs

+ 2 - 2
src/main/logseq/api.cljs

@@ -965,7 +965,7 @@
             _ (db-async/<get-block (state/get-current-repo) block-uuid :children? false)
             db? (config/db-based-graph? (state/get-current-repo))
             key-ns? (and (keyword? key) (namespace key))
-            key (if key-ns? key (-> (if (keyword? key) (name key) key) (util/safe-lower-case)))
+            key (if key-ns? key (if (keyword? key) (name key) key))
             key (if (and db? (not key-ns?))
                   (api-block/get-db-ident-for-user-property-name
                     key (api-block/resolve-property-prefix-for-db this))
@@ -982,7 +982,7 @@
       (when-let [properties (some-> block-uuid (db-model/get-block-by-uuid) (:block/properties))]
         (when (seq properties)
           (let [key (api-block/sanitize-user-property-name key)
-                property-name (-> (if (keyword? key) (name key) key) (util/safe-lower-case))
+                property-name (if (keyword? key) (name key) key)
                 ident (api-block/get-db-ident-for-user-property-name
                         property-name (api-block/resolve-property-prefix-for-db this))
                 property-value (or (get properties key)

+ 3 - 1
src/main/logseq/api/block.cljs

@@ -34,7 +34,9 @@
     (-> k (string/trim)
       (string/replace " " "")
       (string/replace #"^[:_\s]+" "")
-      (string/lower-case))
+      (#(cond-> %
+          (not (string/includes? % "/"))
+          (string/lower-case))))
     k))
 
 (defn resolve-property-prefix-for-db