From 70edd2c290d5aff58156f9a4cc9477f58a6870d1 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 15 Feb 2023 09:59:28 +0100 Subject: [PATCH] :bug: Fix crash when resizing frame --- common/src/app/common/geom/shapes/modifiers.cljc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/common/src/app/common/geom/shapes/modifiers.cljc b/common/src/app/common/geom/shapes/modifiers.cljc index 9b859a5ae..d14f5aaa3 100644 --- a/common/src/app/common/geom/shapes/modifiers.cljc +++ b/common/src/app/common/geom/shapes/modifiers.cljc @@ -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]