From f72206bba31590bb4632ec3ef532584b22a9cbc3 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 31 Jul 2023 16:24:03 +0200 Subject: [PATCH] :bug: Ensure :shapes attr on importing an svg with an empty group This commit should not not be backported to, because the affected code is already refactored and the issue is already fixed on develop branch --- frontend/src/app/main/data/workspace/shapes.cljs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/app/main/data/workspace/shapes.cljs b/frontend/src/app/main/data/workspace/shapes.cljs index e02f720a0..6341a0737 100644 --- a/frontend/src/app/main/data/workspace/shapes.cljs +++ b/frontend/src/app/main/data/workspace/shapes.cljs @@ -57,6 +57,11 @@ cts/default-frame-attrs cts/default-shape-attrs) + default-attrs (if (or (= :group (:type attrs)) + (= :bool (:type attrs))) + (assoc default-attrs :shapes []) + default-attrs) + selected-non-frames (into #{} (comp (map (d/getf objects)) (remove cph/frame-shape?))