Przeglądaj źródła

fix(editor): error key for the block child cp

charlie 1 rok temu
rodzic
commit
afd76f24d4
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      src/main/frontend/components/block.cljs

+ 2 - 1
src/main/frontend/components/block.cljs

@@ -2342,7 +2342,8 @@
                               (some? (mldoc/extract-first-query-from-ast body))))))
         [:div.block-body
          ;; TODO: consistent id instead of the idx (since it could be changed later)
-         (let [body (block/trim-break-lines! (:block/body block))]
+         (let [body (block/trim-break-lines! (:block/body block))
+               uuid (:block/uuid block)]
            (for [[idx child] (medley/indexed body)]
              (when-let [block (markup-element-cp config child)]
                (rum/with-key (block-child block)