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)))]