mirror of
https://github.com/penpot/penpot.git
synced 2026-08-19 03:08:40 +00:00
🐛 Fix crash when editing tokens with group nodes (#11144)
Make sd-token-uuid nil-safe when accessing .original.id to prevent crashes when StyleDictionary emits group nodes alongside real tokens. Group nodes have an original object but no id property, causing undefined is not an object errors during interactive token resolution in the edit modal. Closes #11143 AI-assisted-by: qwen3.7-plus
This commit is contained in:
parent
0797d7235a
commit
4ecd8ffb89
@ -557,7 +557,8 @@
|
||||
(.. sd-token -original -name))
|
||||
|
||||
(defn sd-token-uuid [^js sd-token]
|
||||
(uuid (.-uuid (.. sd-token -original -id))))
|
||||
(when-let [id (.. sd-token -original -id)]
|
||||
(uuid (.-uuid id))))
|
||||
|
||||
(defn- merge-name-collisions
|
||||
"Re-attach tokens that `ctob/tokens-tree` / `backtrace-tokens-tree`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user