0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-10 00:58:26 -05:00

🐛 Fix working of undo when more than 50 entries

This commit is contained in:
Andrés Moya 2020-09-30 15:24:40 +02:00 committed by Alonso Torres
parent 20952e30da
commit 736c9e7e8c

View file

@ -283,7 +283,8 @@
items (conj-undo-entry items entry)]
(-> state
(update :workspace-undo assoc :items items
:index (inc index))))
:index (min (inc index)
(dec MAX-UNDO-SIZE)))))
state))
(defn- accumulate-undo-entry