From a7c1f7ba69a1ce7262d41c73efe3eb07cb5189ee Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 11 Apr 2025 08:54:02 +0200 Subject: [PATCH] :bug: Fix incorrect undo handling on path edition --- CHANGES.md | 3 ++- common/src/app/common/data/undo_stack.cljc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ec306c8829..6c020ebb18 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,11 +1,12 @@ # CHANGELOG -## 2.6.2 +## 2.6.2 (Unreleased) ### :bug: Bugs fixed - Increase the height of the right sidebar dropdowns [Taiga #10615](https://tree.taiga.io/project/penpot/issue/10615) - Fix scroll on token themes modal [Taiga #10745](https://tree.taiga.io/project/penpot/issue/10745) +- Fix unexpected exception on path editor on merge segments when undo stack is empty ## 2.6.1 diff --git a/common/src/app/common/data/undo_stack.cljc b/common/src/app/common/data/undo_stack.cljc index 61117cb2ee..dbcae0db14 100644 --- a/common/src/app/common/data/undo_stack.cljc +++ b/common/src/app/common/data/undo_stack.cljc @@ -47,7 +47,7 @@ (defn undo [stack] - (update stack :index dec)) + (update stack :index #(max 0 (dec %)))) (defn redo [{index :index items :items :as stack}]