mirror of
https://github.com/penpot/penpot.git
synced 2026-09-11 22:49:30 +00:00
🐛 Fix incorrect recursion on looking boolean parent (#7212)
This commit is contained in:
parent
44245d1b5f
commit
629541bc9d
@ -277,12 +277,22 @@
|
|||||||
[objects selected-shape-ids shape]
|
[objects selected-shape-ids shape]
|
||||||
|
|
||||||
(let [parent-id (:parent-id shape)
|
(let [parent-id (:parent-id shape)
|
||||||
parent (get objects parent-id)]
|
parent (get objects parent-id)]
|
||||||
|
|
||||||
(cond
|
(cond
|
||||||
(nil? shape) false ;; failsafe
|
(nil? shape)
|
||||||
(contains? selected-shape-ids (:id shape)) false ;; if it is one of the selected shapes, it is considerer not a bool descendant
|
false
|
||||||
(= :bool (:type parent)) true ;; if its parent is of type bool, it is a bool descendant
|
|
||||||
:else (recur [parent-id parent] objects selected-shape-ids)))) ;; else, check its parent
|
;; if it is one of the selected shapes, it is considerer not a
|
||||||
|
;; bool descendant
|
||||||
|
(contains? selected-shape-ids (:id shape))
|
||||||
|
false
|
||||||
|
|
||||||
|
(cfh/bool-shape? parent)
|
||||||
|
true
|
||||||
|
|
||||||
|
:else
|
||||||
|
(recur objects selected-shape-ids parent))))
|
||||||
|
|
||||||
(defn- check-options-props
|
(defn- check-options-props
|
||||||
[new-props old-props]
|
[new-props old-props]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user