From c670d81a208aa7645d71aa857a357f6e66b5a0bf Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Fri, 14 Oct 2022 11:13:24 +0200 Subject: [PATCH] :bug: Fix assertion error trying to move board if path tool selected --- CHANGES.md | 2 ++ frontend/src/app/main/data/workspace/path/edition.cljs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 6fcf5d7aa..c35c9e4f9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -44,6 +44,7 @@ - Fix boards grouped shouldn't show the title [Taiga #4251](https://tree.taiga.io/project/penpot/issue/4251) - Fix gradient handlers are under resize handlers[Taiga #4298](https://tree.taiga.io/project/penpot/issue/4298) - Fix grid not syncing immediately in multiuser [Taiga #4339](https://tree.taiga.io/project/penpot/issue/4339) +- Fix assertions error when trying to move board if Path tool selected [Taiga #4248](https://tree.taiga.io/project/penpot/issue/4248) ### :arrow_up: Deps updates ### :heart: Community contributions by (Thank you!) @@ -59,6 +60,7 @@ - Fix copied & pasted layer is not visible [Taiga #4283](https://tree.taiga.io/project/penpot/issue/4283) - Fix notification to newsletter is shown in all cases [Taiga #4367](https://tree.taiga.io/project/penpot/issue/4367) - Fix comments section is not scrolling by mouse wheel [Taiga #4305](https://tree.taiga.io/project/penpot/issue/4305) + ## 1.15.4-beta ### :bug: Bugs fixed diff --git a/frontend/src/app/main/data/workspace/path/edition.cljs b/frontend/src/app/main/data/workspace/path/edition.cljs index 46617ec06..7ecf800c8 100644 --- a/frontend/src/app/main/data/workspace/path/edition.cljs +++ b/frontend/src/app/main/data/workspace/path/edition.cljs @@ -204,7 +204,8 @@ (watch [_ state stream] (let [id (get-in state [:workspace-local :edition]) current-move (get-in state [:workspace-local :edit-path id :current-move])] - (if (= same-event current-move) + ;; id can be null if we just selected the tool but we didn't start drawing + (if (and id (= same-event current-move)) (let [points (get-in state [:workspace-local :edit-path id :selected-points] #{}) move-events (->> stream