Przeglądaj źródła

fix: resizing image breaks validity of :url blocks

db graphs should storing this in properties, not text.
Fixes https://github.com/logseq/db-test/issues/241
Gabriel Horner 9 miesięcy temu
rodzic
commit
c56f3312df
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      src/main/frontend/handler/editor.cljs

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

@@ -1929,9 +1929,9 @@
 (defn resize-image!
   [config block-id metadata full_text size]
   (let [asset (:asset-block config)]
-    (if (and asset (config/db-based-graph?))
+    (if (config/db-based-graph?)
       (property-handler/set-block-property! (state/get-current-repo)
-                                            (:db/id asset)
+                                            (if asset (:db/id asset) block-id)
                                             :logseq.property.asset/resize-metadata
                                             size)
       (let [new-meta (merge metadata size)