Browse Source

fix: presenting modal

Tienson Qin 5 months ago
parent
commit
c87611e985
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main/mobile/components/modal.cljs

+ 2 - 1
src/main/mobile/components/modal.cljs

@@ -20,7 +20,8 @@
   (let [{:keys [open? block]} (rum/react mobile-state/*modal-data)
         show-action-bar? (state/sub :mobile/show-action-bar?)
         close! #(swap! mobile-state/*modal-data assoc :open? false)
-        block (db/entity (:db/id block))
+        block (when-let [id (:block/uuid block)]
+                (db/entity [:block/uuid id]))
         open? (and open? block)]
     (when open?
       (state/clear-edit!)