mirror of
https://github.com/penpot/penpot.git
synced 2026-04-27 04:08:23 +00:00
⚡ Add micro optimization to cph/root? predicate
accessing directly to the prop instead of using the lookup operation
This commit is contained in:
parent
8d46271e9d
commit
4a4423da70
@ -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]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user