From 7036dddad16d639717ecc05a38f676c9789bb65e Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Wed, 26 Jul 2023 07:37:23 +0200 Subject: [PATCH] :bug: Fix enable undo just after using pencil --- CHANGES.md | 1 + frontend/src/app/main/data/workspace/common.cljs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 3deefff77..119d895cf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -93,6 +93,7 @@ - Fix copy color information in several formats [Taiga #4723](https://tree.taiga.io/project/penpot/issue/4723) - Fix dropdown width [Taiga #5541](https://tree.taiga.io/project/penpot/issue/5541) - Fix enable comment mode and insert image keeps on comment mode [Taiga #5678](https://tree.taiga.io/project/penpot/issue/5678) +- Fix enable undo just after using pencil [Taiga #5674](https://tree.taiga.io/project/penpot/issue/5674) ### :arrow_up: Deps updates diff --git a/frontend/src/app/main/data/workspace/common.cljs b/frontend/src/app/main/data/workspace/common.cljs index 11fef1fd5..c4ea1a7e9 100644 --- a/frontend/src/app/main/data/workspace/common.cljs +++ b/frontend/src/app/main/data/workspace/common.cljs @@ -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)))]