fix: remove non exists block refs when importing from files

This commit is contained in:
Tienson Qin
2021-03-23 11:13:41 +08:00
parent e61c02bd27
commit c0aaff5037
2 changed files with 20 additions and 1 deletions

View File

@@ -351,6 +351,7 @@
(if (string? ref)
{:block/name (string/lower-case ref)}
ref)))
(remove vector?)
(distinct))]
(recur (rest blocks)
(conj acc (assoc block :block/path-refs path-ref-pages))