0
Fork 0
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:
Alejandro 2023-02-15 11:49:17 +01:00 committed by GitHub
commit 2ef3e4b325
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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]