mirror of
https://github.com/penpot/penpot.git
synced 2025-05-15 09:36:40 +02:00
Make prevent-default and stop-propagation functions nil safe.
This commit is contained in:
parent
db95342759
commit
299c2bf06c
1 changed files with 4 additions and 2 deletions
|
@ -16,11 +16,13 @@
|
||||||
|
|
||||||
(defn stop-propagation
|
(defn stop-propagation
|
||||||
[e]
|
[e]
|
||||||
(.stopPropagation e))
|
(when e
|
||||||
|
(.stopPropagation e)))
|
||||||
|
|
||||||
(defn prevent-default
|
(defn prevent-default
|
||||||
[e]
|
[e]
|
||||||
(.preventDefault e))
|
(when e
|
||||||
|
(.preventDefault e)))
|
||||||
|
|
||||||
(defn event->inner-text
|
(defn event->inner-text
|
||||||
[e]
|
[e]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue