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

Merge pull request #4229 from penpot/superalex-fix-concat-changes

🐛 Fix concat changes
This commit is contained in:
Pablo Alba 2024-03-07 10:58:26 +01:00 committed by GitHub
commit 875ea58a01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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!