0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -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}] (defn resolve-token-value [{:keys [value resolved-value] :as token}]
(or (or
resolved-value resolved-value
(if-let [int-or-double (d/parse-double value)] (d/parse-double value)))
int-or-double
(throw (ex-info (str "Implement token value resolve for " value) token)))))
(defn maybe-resolve-token-value [{:keys [value] :as token}] (defn maybe-resolve-token-value [{:keys [value] :as token}]
(when value (resolve-token-value token))) (when value (resolve-token-value token)))