From a95bd7f02abd18adbb9a14086fac52cf4179696c Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 22 Sep 2016 22:32:56 +0300 Subject: [PATCH] Improve `color/hex?` predicate. --- src/uxbox/util/color.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uxbox/util/color.cljs b/src/uxbox/util/color.cljs index 2805ebc8e..b03f61ea0 100644 --- a/src/uxbox/util/color.cljs +++ b/src/uxbox/util/color.cljs @@ -49,4 +49,5 @@ (defn hex? [v] - (not (nil? (re-find #"^#[0-9A-Fa-f]{6}$" v)))) + (and (string? v) + (re-seq #"^#[0-9A-Fa-f]{6}$" v)))