Fix token images not being displayed (#18288)
Signed-off-by: Brian Sztamfater <brian@status.im>
This commit is contained in:
parent
01e8c7e480
commit
107d1a80c9
|
@ -3,12 +3,13 @@
|
||||||
(:require [clojure.string :as string]))
|
(:require [clojure.string :as string]))
|
||||||
|
|
||||||
(def ^:private tokens (loader/resolve-tokens))
|
(def ^:private tokens (loader/resolve-tokens))
|
||||||
|
(def ^:private safe-lower-case (comp string/lower-case str))
|
||||||
|
|
||||||
(defn- get-token-image*
|
(defn- get-token-image*
|
||||||
[token]
|
[token]
|
||||||
(let [token-symbol (cond-> token
|
(let [token-symbol (cond-> token
|
||||||
(keyword? token) name
|
(keyword? token) name
|
||||||
:always (comp string/lower-case str))]
|
:always safe-lower-case)]
|
||||||
(get tokens token-symbol)))
|
(get tokens token-symbol)))
|
||||||
|
|
||||||
(def get-token-image (memoize get-token-image*))
|
(def get-token-image (memoize get-token-image*))
|
||||||
|
|
Loading…
Reference in New Issue