0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 02:28:18 -05:00

💄 Minor cosmetic change on get-parents fn.

This commit is contained in:
Andrey Antukh 2022-01-20 18:26:36 +01:00 committed by Andrés Moya
parent 07a0f67b32
commit b96ad5b37f

View file

@ -137,9 +137,8 @@
(defn get-parents
[shape-id objects]
(let [{:keys [parent-id]} (get objects shape-id)]
(when parent-id
(lazy-seq (cons parent-id (get-parents parent-id objects))))))
(when-let [parent-id (->> shape-id (get objects) :parent-id)]
(lazy-seq (cons parent-id (get-parents parent-id objects)))))
(defn get-frame
"Get the frame that contains the shape. If the shape is already a frame, get itself."