0
Fork 0
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:
Andrey Antukh 2016-04-02 11:45:19 +03:00
parent db95342759
commit 299c2bf06c

View file

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