From 107d1a80c9e42ea756b7b3a63a3a7a77f36b9a84 Mon Sep 17 00:00:00 2001 From: Ulises Manuel <90291778+ulisesmac@users.noreply.github.com> Date: Wed, 27 Dec 2023 09:43:47 -0600 Subject: [PATCH] Fix token images not being displayed (#18288) Signed-off-by: Brian Sztamfater --- src/quo/components/utilities/token/loader.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/quo/components/utilities/token/loader.cljs b/src/quo/components/utilities/token/loader.cljs index af3274b780..ebdd83bd57 100644 --- a/src/quo/components/utilities/token/loader.cljs +++ b/src/quo/components/utilities/token/loader.cljs @@ -3,12 +3,13 @@ (:require [clojure.string :as string])) (def ^:private tokens (loader/resolve-tokens)) +(def ^:private safe-lower-case (comp string/lower-case str)) (defn- get-token-image* [token] (let [token-symbol (cond-> token (keyword? token) name - :always (comp string/lower-case str))] + :always safe-lower-case)] (get tokens token-symbol))) (def get-token-image (memoize get-token-image*))