mirror of
https://github.com/penpot/penpot.git
synced 2026-09-14 16:09:01 +00:00
Merge pull request #4229 from penpot/superalex-fix-concat-changes
🐛 Fix concat changes
This commit is contained in:
commit
875ea58a01
@ -109,11 +109,12 @@
|
|||||||
[changes f]
|
[changes f]
|
||||||
(update changes :redo-changes #(mapv f %)))
|
(update changes :redo-changes #(mapv f %)))
|
||||||
|
|
||||||
|
;; redo-changes is a vector and :undo-changes is a list
|
||||||
(defn concat-changes
|
(defn concat-changes
|
||||||
[changes1 changes2]
|
[changes1 changes2]
|
||||||
(-> changes1
|
(-> changes1
|
||||||
(update :redo-changes d/concat-vec (:redo-changes changes2))
|
(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
|
; TODO: remove this when not needed
|
||||||
(defn- assert-page-id!
|
(defn- assert-page-id!
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user