mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 08:50:57 -05: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…
Reference in a new issue