0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-16 08:51:32 -05:00

🐛 Fix bug on undo deletion of canvas with shapes.

This commit is contained in:
Andrey Antukh 2020-03-10 13:19:09 +01:00
parent 6f0d45dfcd
commit 203a165502

View file

@ -1257,6 +1257,8 @@
(let [objects (get-in state [:workspace-data :objects])
session-id (:session-id state)
ids (seq ids)
rchanges (mapv #(array-map :type :del-obj :id %) ids)
uchanges (mapv (fn [id]
(let [obj (get objects id)
@ -1267,7 +1269,7 @@
:frame-id (:id frm)
:index idx
:obj obj}))
ids)]
(reverse ids))]
(rx/of (commit-changes rchanges uchanges {:commit-local? true}))))))
(defn- delete-frame