From 48819a173864f03a7c91db49e7cc186a15475de0 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 9 Jul 2016 15:04:24 +0300 Subject: [PATCH] Improve parse-int function. --- src/uxbox/util/data.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uxbox/util/data.cljs b/src/uxbox/util/data.cljs index d274b0e61..5de55e0ce 100644 --- a/src/uxbox/util/data.cljs +++ b/src/uxbox/util/data.cljs @@ -94,7 +94,7 @@ (defn parse-int ([v] - (js/parseInt v 10)) + (parse-int v nil)) ([v default] (let [v (js/parseInt v 10)] (if (or (not v) (nan? v)) @@ -103,7 +103,7 @@ (defn parse-float ([v] - (js/parseFloat v)) + (parse-float v nil)) ([v default] (let [v (js/parseFloat v)] (if (or (not v) (nan? v))