0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-13 16:21:57 -05:00

Merge pull request #2784 from penpot/palba-fix-undo-in-multiplayer

🐛 Fix undo corner case in multiplayer
This commit is contained in:
Alejandro 2023-01-17 09:32:52 +01:00 committed by GitHub
commit 3280a6853e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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))]