🐛 Fix assertion error trying to move board if path tool selected

This commit is contained in:
Alejandro Alonso 2022-10-14 11:13:24 +02:00 committed by Eva
parent a8e6516059
commit c670d81a20
2 changed files with 4 additions and 1 deletions

View file

@ -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