0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-10 05:51:33 -05:00

🐛 Fix resolved value when opening the token edit form

This commit is contained in:
Andrés Moya 2025-03-25 14:43:16 +01:00 committed by Andrés Moya
parent a7044c73ba
commit 9115e1a3a3

View file

@ -235,7 +235,14 @@
token-properties (wtch/get-token-properties token)
color? (wtt/color-token? token)
selected-set-tokens (mf/deref refs/workspace-selected-token-set-tokens)
active-theme-tokens (mf/deref refs/workspace-active-theme-sets-tokens)
active-theme-tokens (cond-> (mf/deref refs/workspace-active-theme-sets-tokens)
;; Ensure that the resolved value uses the currently editing token
;; even if the name has been overriden by a token with the same name
;; in another set below.
(and (:name token) (:value token))
(assoc (:name token) token))
resolved-tokens (sd/use-resolved-tokens active-theme-tokens {:cache-atom form-token-cache-atom
:interactive? true})
token-path (mf/use-memo