0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-20 11:41:47 -05:00

🐛 Fix unexpected exception on incorrect thumbnail gen of root shape

This commit is contained in:
Andrey Antukh 2024-01-09 23:10:14 +01:00
parent 9e40b4551d
commit 5502f317ad

View file

@ -32,13 +32,17 @@
([objects id]
(is-direct-child-of-root? (get objects id)))
([shape]
(and (some? shape) (= (dm/get-prop shape :frame-id) uuid/zero))))
(and (some? shape)
(= (dm/get-prop shape :frame-id) uuid/zero))))
(defn root-frame?
([objects id]
(root-frame? (get objects id)))
(if (= id uuid/zero)
false
(root-frame? (get objects id))))
([shape]
(and (some? shape)
(not= (dm/get-prop shape :id) uuid/zero)
(= (dm/get-prop shape :type) :frame)
(= (dm/get-prop shape :frame-id) uuid/zero))))