diff --git a/frontend/src/app/main/ui/shapes/shape.cljs b/frontend/src/app/main/ui/shapes/shape.cljs index 659ce9f23..0cb212a8a 100644 --- a/frontend/src/app/main/ui/shapes/shape.cljs +++ b/frontend/src/app/main/ui/shapes/shape.cljs @@ -42,7 +42,7 @@ (defn propagate-wrapper-styles ([children wrapper-props] - (if (.isArray js/Array children) + (if ^boolean (obj/array? children) (->> children (map #(propagate-wrapper-styles-child % wrapper-props))) (-> children (propagate-wrapper-styles-child wrapper-props))))) diff --git a/frontend/src/app/util/object.cljs b/frontend/src/app/util/object.cljs index 4c6d31981..c9caf8f2b 100644 --- a/frontend/src/app/util/object.cljs +++ b/frontend/src/app/util/object.cljs @@ -6,11 +6,15 @@ (ns app.util.object "A collection of helpers for work with javascript objects." - (:refer-clojure :exclude [set! new get get-in merge clone contains?]) + (:refer-clojure :exclude [set! new get get-in merge clone contains? array?]) (:require ["lodash/omit" :as omit] [cuerdas.core :as str])) +(defn array? + [o] + (.isArray js/Array o)) + (defn create [] #js {}) (defn get