diff --git a/common/src/app/common/pages/changes.cljc b/common/src/app/common/pages/changes.cljc index b7a81a136f..334edefb1c 100644 --- a/common/src/app/common/pages/changes.cljc +++ b/common/src/app/common/pages/changes.cljc @@ -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))]