0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-10 14:51:37 -05:00

🐛 Fix concat changes

This commit is contained in:
Alejandro Alonso 2024-03-07 10:54:03 +01:00
parent 24fb48ea0f
commit b3f97fe456

View file

@ -109,11 +109,12 @@
[changes f]
(update changes :redo-changes #(mapv f %)))
;; redo-changes is a vector and :undo-changes is a list
(defn concat-changes
[changes1 changes2]
(-> changes1
(update :redo-changes d/concat-vec (:redo-changes changes2))
(update :undo-changes d/concat-vec (:undo-changes changes2))))
(update :undo-changes #(concat (:undo-changes changes2) %))))
; TODO: remove this when not needed
(defn- assert-page-id!