0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 15:39:50 -05:00

🐛 Fix minor issues on page helpers

This commit is contained in:
Andrey Antukh 2022-07-13 08:36:54 +02:00
parent 8fd908a59f
commit 8237805cf5

View file

@ -161,8 +161,7 @@
(defn get-frames
"Retrieves all frame objects as vector"
[objects]
(if (contains? (meta objects) ::index-frames)
(::index-frames (meta objects))
(or (-> objects meta ::index-frames)
(let [lookup (d/getf objects)
xform (comp (remove #(= uuid/zero %))
(keep lookup)
@ -704,11 +703,10 @@
(into []
(comp (map (d/getf objects))
(if all-frames?
identity
(map identity)
(remove :hide-in-viewer)))
(sort-z-index objects (get-frames-ids objects) {:top-frames? true}))))
(defn start-page-index
[objects]
(with-meta objects {::index-frames (get-frames (with-meta objects nil))}))