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

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