mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 18:48:37 -05:00
Merge pull request #2944 from penpot/alotor-fix-unhandled-error
🐛 Fix crash when resizing frame
This commit is contained in:
commit
2ef3e4b325
1 changed files with 9 additions and 7 deletions
|
@ -115,13 +115,15 @@
|
|||
(if (empty? children)
|
||||
modif-tree
|
||||
(let [child-id (first children)
|
||||
child (get objects child-id)
|
||||
child-bounds @(get bounds child-id)
|
||||
child-modifiers (gct/calc-child-modifiers parent child modifiers ignore-constraints child-bounds parent-bounds transformed-parent-bounds)]
|
||||
(recur (cond-> modif-tree
|
||||
(not (ctm/empty? child-modifiers))
|
||||
(update-in [child-id :modifiers] ctm/add-modifiers child-modifiers))
|
||||
(rest children)))))))))
|
||||
child (get objects child-id)]
|
||||
(if (some? child)
|
||||
(let [child-bounds @(get bounds child-id)
|
||||
child-modifiers (gct/calc-child-modifiers parent child modifiers ignore-constraints child-bounds parent-bounds transformed-parent-bounds)]
|
||||
(recur (cond-> modif-tree
|
||||
(not (ctm/empty? child-modifiers))
|
||||
(update-in [child-id :modifiers] ctm/add-modifiers child-modifiers))
|
||||
(rest children)))
|
||||
(recur modif-tree (rest children))))))))))
|
||||
|
||||
(defn get-group-bounds
|
||||
[objects bounds modif-tree shape]
|
||||
|
|
Loading…
Add table
Reference in a new issue