Browse Source

fix: handle empty block embed

Yukun Guo 4 years ago
parent
commit
67400df0ea
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/main/frontend/components/block.cljs

+ 3 - 0
src/main/frontend/components/block.cljs

@@ -690,6 +690,9 @@
         (= name "embed")
         (let [a (first arguments)]
           (cond
+            (nil? a) ; empty embed
+            nil
+
             (and (string/starts-with? a "[[")
                  (string/ends-with? a "]]"))
             (let [page-name (-> (string/replace a "[[" "")