🐛 Fix enable undo just after using pencil

This commit is contained in:
Alejandro Alonso 2023-07-26 07:37:23 +02:00
parent 92ee6320f5
commit 7036dddad1
2 changed files with 2 additions and 1 deletions

View file

@ -119,7 +119,7 @@
(watch [it state _]
(let [edition (get-in state [:workspace-local :edition])
drawing (get state :workspace-drawing)]
(when-not (or (some? edition) (not-empty drawing))
(when-not (or (some? edition) (some? (:object drawing)))
(let [undo (:workspace-undo state)
items (:items undo)
index (or (:index undo) (dec (count items)))]