mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 01:31:44 +02:00
🐛 Fix unexpected console errors on removing shape.
Caused because in some instances selected shapes set will contain an id that is already removed from object. This is a tipical race condition.
This commit is contained in:
parent
239ec12529
commit
94ccc013d7
4 changed files with 15 additions and 11 deletions
|
@ -233,7 +233,8 @@
|
|||
:stroke-width (/ select-guide-width zoom)
|
||||
:stroke-dasharray (/ select-guide-dasharray zoom)}}])])
|
||||
|
||||
(mf/defc measurement [{:keys [bounds frame selected-shapes hover-shape zoom]}]
|
||||
(mf/defc measurement
|
||||
[{:keys [bounds frame selected-shapes hover-shape zoom]}]
|
||||
(let [selected-ids (into #{} (map :id) selected-shapes)
|
||||
selected-selrect (gsh/selection-rect selected-shapes)
|
||||
hover-selrect (:selrect hover-shape)
|
||||
|
@ -244,7 +245,7 @@
|
|||
[:g.measurement-feedback {:pointer-events "none"}
|
||||
[:& selection-guides {:selrect selected-selrect :bounds bounds :zoom zoom}]
|
||||
[:& size-display {:selrect selected-selrect :zoom zoom}]
|
||||
|
||||
|
||||
(if (or (not hover-shape) (not hover-selected-shape?))
|
||||
(when frame
|
||||
[:g.hover-shapes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue