🐛 Try to remove cases when the thumbnail could be empty

This commit is contained in:
alonso.torres 2023-01-23 14:07:51 +01:00
parent 1c54e9fa4d
commit 316b3d4539
2 changed files with 39 additions and 18 deletions

View file

@ -264,12 +264,14 @@
(defn append-child!
[^js el child]
(when (some? el)
(.appendChild ^js el child)))
(.appendChild ^js el child))
el)
(defn remove-child!
[^js el child]
(when (some? el)
(.removeChild ^js el child)))
(.removeChild ^js el child))
el)
(defn get-first-child
[^js el]
@ -639,3 +641,11 @@
{:ascent (.-fontBoundingBoxAscent measure)
:descent (.-fontBoundingBoxDescent measure)}))
(defn clone-node
[^js node]
(.cloneNode node))
(defn has-children?
[^js node]
(> (-> node .-children .-length) 0))