From f4124b28d85e9eeaaac7330b59f90dd86db11f2e Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 30 Nov 2020 15:57:32 +0100 Subject: [PATCH] :bug: Fix wrong argument number on recursive delete operation (shapes). --- common/app/common/pages.cljc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/app/common/pages.cljc b/common/app/common/pages.cljc index 971cf9296..26c6e482a 100644 --- a/common/app/common/pages.cljc +++ b/common/app/common/pages.cljc @@ -807,7 +807,7 @@ (defmethod process-change :del-obj [data {:keys [page-id component-id id ignore-touched] :as change}] - (letfn [(delete-object [objects] + (letfn [(delete-object [objects id] (if-let [target (get objects id)] (let [parent-id (cph/get-parent id objects) frame-id (:frame-id target) @@ -829,8 +829,8 @@ (as-> $ (reduce delete-object $ (:shapes target))))) objects))] (if page-id - (d/update-in-when data [:pages-index page-id :objects] delete-object) - (d/update-in-when data [:components component-id :objects] delete-object)))) + (d/update-in-when data [:pages-index page-id :objects] delete-object id) + (d/update-in-when data [:components component-id :objects] delete-object id)))) (defn rotation-modifiers [center shape angle]