0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-10 17:18:21 -05:00

🐛 Fix undo corner case in multiplayer

This commit is contained in:
Pablo Alba 2023-01-16 11:43:42 +01:00
parent 0faa0b21a4
commit ab421ac3f9

View file

@ -265,7 +265,8 @@
(move-objects [objects]
(let [valid? (every? (partial is-valid-move? objects) shapes)
parent (get objects parent-id)
index (if (nil? after-shape) index (inc (d/index-of (:shapes parent) after-shape)))
after-shape-index (d/index-of (:shapes parent) after-shape)
index (if (nil? after-shape-index) index (inc after-shape-index))
frame-id (if (= :frame (:type parent))
(:id parent)
(:frame-id parent))]