🐛 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:
Andrey Antukh 2021-04-13 13:10:51 +02:00
parent 239ec12529
commit 94ccc013d7
4 changed files with 15 additions and 11 deletions

View file

@ -90,9 +90,7 @@
(let [target (.-target ^js event)]
(when (and (not (.-isContentEditable target)) ;; ignore when pasting into
(not= (.-tagName target) "INPUT")) ;; an editable control
(-> ^js event
(.getBrowserEvent)
(.-clipboardData)))))
(.. ^js event getBrowserEvent -clipboardData))))
(defn extract-text
[clipboard-data]