0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-25 07:58:49 -05:00

Add micro optimization to cph/root? predicate

accessing directly to the prop instead of using
the lookup operation
This commit is contained in:
Andrey Antukh 2023-06-20 11:46:29 +02:00
parent 8d46271e9d
commit 4a4423da70

View file

@ -22,8 +22,9 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn root?
[{:keys [id type]}]
(and (= type :frame) (= id uuid/zero)))
[shape]
(and (= (dm/get-prop shape :type) :frame)
(= (dm/get-prop shape :id) uuid/zero)))
(defn root-frame?
([objects id]