0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-13 07:21:40 -05:00

Merge pull request #1916 from penpot/superalex-fix-undo-drawing-curve

🐛 Fix undo when drawing curve
This commit is contained in:
Pablo Alba 2022-05-18 10:57:07 +02:00 committed by GitHub
commit 7c23b7ea79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,7 +124,7 @@
(let [edition (get-in state [:workspace-local :edition])
drawing (get state :workspace-drawing)]
;; Editors handle their own undo's
(when-not (or (some? edition) (not-empty drawing))
(when-not (or (some? edition) (and (not-empty drawing) (nil? (:object drawing))))
(let [undo (:workspace-undo state)
items (:items undo)
index (or (:index undo) (dec (count items)))]