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:
parent
8d46271e9d
commit
4a4423da70
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue