mirror of
https://github.com/penpot/penpot.git
synced 2026-02-12 22:53:02 +00:00
🐛 Fix component sync in undo
This commit is contained in:
@@ -150,7 +150,8 @@
|
||||
:hint-origin (ptk/type origin)
|
||||
:changes redo-changes
|
||||
:page-id page-id
|
||||
:frames frames})
|
||||
:frames frames
|
||||
:save-undo? save-undo?})
|
||||
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
|
||||
@@ -842,11 +842,11 @@
|
||||
|
||||
check-changes
|
||||
(fn [[event data]]
|
||||
(let [changes (-> event deref :changes)
|
||||
(let [{:keys [changes save-undo?]} (deref event)
|
||||
components-changed (reduce #(into %1 (ch/components-changed data %2))
|
||||
#{}
|
||||
changes)]
|
||||
(when (d/not-empty? components-changed)
|
||||
(when (and (d/not-empty? components-changed) save-undo?)
|
||||
(log/info :msg "DETECTED COMPONENTS CHANGED"
|
||||
:ids (map str components-changed))
|
||||
(run! st/emit!
|
||||
|
||||
Reference in New Issue
Block a user