mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 14:18:24 +02: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)
|
(if (empty? children)
|
||||||
modif-tree
|
modif-tree
|
||||||
(let [child-id (first children)
|
(let [child-id (first children)
|
||||||
child (get objects child-id)
|
child (get objects child-id)]
|
||||||
child-bounds @(get bounds child-id)
|
(if (some? child)
|
||||||
child-modifiers (gct/calc-child-modifiers parent child modifiers ignore-constraints child-bounds parent-bounds transformed-parent-bounds)]
|
(let [child-bounds @(get bounds child-id)
|
||||||
(recur (cond-> modif-tree
|
child-modifiers (gct/calc-child-modifiers parent child modifiers ignore-constraints child-bounds parent-bounds transformed-parent-bounds)]
|
||||||
(not (ctm/empty? child-modifiers))
|
(recur (cond-> modif-tree
|
||||||
(update-in [child-id :modifiers] ctm/add-modifiers child-modifiers))
|
(not (ctm/empty? child-modifiers))
|
||||||
(rest children)))))))))
|
(update-in [child-id :modifiers] ctm/add-modifiers child-modifiers))
|
||||||
|
(rest children)))
|
||||||
|
(recur modif-tree (rest children))))))))))
|
||||||
|
|
||||||
(defn get-group-bounds
|
(defn get-group-bounds
|
||||||
[objects bounds modif-tree shape]
|
[objects bounds modif-tree shape]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue