mirror of
https://github.com/penpot/penpot.git
synced 2026-08-09 14:28:55 +00:00
🐛 Fix crash when editing tokens with group nodes
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
2f04fcddbf
commit
b0b6ed30f5
@ -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