0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-06 14:50:20 -05:00

Handle tokens with issues in ui

This commit is contained in:
Florian Schroedl 2024-06-18 11:28:09 +02:00
parent a390942722
commit 742bb6de05

View file

@ -37,9 +37,7 @@
(defn resolve-token-value [{:keys [value resolved-value] :as token}]
(or
resolved-value
(if-let [int-or-double (d/parse-double value)]
int-or-double
(throw (ex-info (str "Implement token value resolve for " value) token)))))
(d/parse-double value)))
(defn maybe-resolve-token-value [{:keys [value] :as token}]
(when value (resolve-token-value token)))