From 299c2bf06c23abb699d3739a9565e81c3b41f33c Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 2 Apr 2016 11:45:19 +0300 Subject: [PATCH] Make prevent-default and stop-propagation functions nil safe. --- src/uxbox/util/dom.cljs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/uxbox/util/dom.cljs b/src/uxbox/util/dom.cljs index 6d86330a6..846d2becf 100644 --- a/src/uxbox/util/dom.cljs +++ b/src/uxbox/util/dom.cljs @@ -16,11 +16,13 @@ (defn stop-propagation [e] - (.stopPropagation e)) + (when e + (.stopPropagation e))) (defn prevent-default [e] - (.preventDefault e)) + (when e + (.preventDefault e))) (defn event->inner-text [e]