Browse Source

fix: a block can be collapsed only when it has children or both title

and body.
Tienson Qin 4 years ago
parent
commit
534cb13f52
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main/frontend/components/block.cljs

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

@@ -1367,7 +1367,8 @@
         has-children-blocks? (and (coll? children) (seq children))
         has-child? (and
                     (not (:pre-block? block))
-                    (or has-children-blocks? (seq body)))
+                    (or has-children-blocks?
+                        (and (seq (:block/title block)) (seq body))))
         control-show? (and
                        (or (and (seq (:block/title block))
                                 (seq body))