diff --git a/src/main/frontend/rum.cljs b/src/main/frontend/rum.cljs index 93870ffd5b..de4f7f291d 100644 --- a/src/main/frontend/rum.cljs +++ b/src/main/frontend/rum.cljs @@ -12,10 +12,7 @@ (defn kebab-case->camel-case "Converts from kebab case to camel case, eg: on-click to onClick" [input] - (let [words (s/split input #"-") - capitalize (->> (rest words) - (map #(apply str (s/upper-case (first %)) (rest %))))] - (apply str (first words) capitalize))) + (s/replace input #"-([a-z])" (fn [[_ c]] (s/upper-case c)))) (defn map-keys->camel-case "Stringifys all the keys of a cljs hashmap and converts them