0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00

Log whole token

This commit is contained in:
Florian Schroedl 2024-05-10 10:26:22 +02:00
parent df48295903
commit 5813acea02

View file

@ -30,10 +30,10 @@
[token shapes token-attributes]
(some #(token-applied? token % token-attributes) shapes))
(defn resolve-token-value [value]
(defn resolve-token-value [{:keys [value] :as token}]
(if-let [int-or-double (d/parse-double value)]
int-or-double
(throw (ex-info (str "Implement token value resolve for " value) value))))
(throw (ex-info (str "Implement token value resolve for " value) token))))
;; Update functions ------------------------------------------------------------
@ -44,7 +44,7 @@
(eduction
(remove #(tokens-applied? token % attributes))
(map :id)))
token-value (resolve-token-value (:value token))]
token-value (resolve-token-value token)]
(doseq [shape selected-shapes]
(st/emit! (on-apply {:token-id (:id token)
:shape-id (:id shape)