From a2e3da2c07fed63dbb436b935ee5e37966ef9dd0 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 21 Sep 2023 12:05:46 +0200 Subject: [PATCH] :bug: Treat vendor specific props correctly on attrs->props --- common/src/app/common/svg.cljc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/src/app/common/svg.cljc b/common/src/app/common/svg.cljc index 20ee86d94..6e07af39a 100644 --- a/common/src/app/common/svg.cljc +++ b/common/src/app/common/svg.cljc @@ -558,8 +558,12 @@ (defn- camelize [s] (when (string? s) - #?(:cljs (js* "~{}.replace(\":\", \"-\").replace(/-./g, x=>x[1].toUpperCase())", s) - :clj (str/camel s)))) + (let [vendor? (str/starts-with? s "-") + result #?(:cljs (js* "~{}.replace(\":\", \"-\").replace(/-./g, x=>x[1].toUpperCase())", s) + :clj (str/camel s))] + (if ^boolean vendor? + (str/capital result) + result)))) (defn parse-style [style]