From b0b6ed30f55773bc879eb0675e711d85d62712e1 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 8 Aug 2026 13:53:06 +0000 Subject: [PATCH] :bug: 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 --- frontend/src/app/main/data/style_dictionary.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/style_dictionary.cljs b/frontend/src/app/main/data/style_dictionary.cljs index 446e130bdb..ba1f2dd67f 100644 --- a/frontend/src/app/main/data/style_dictionary.cljs +++ b/frontend/src/app/main/data/style_dictionary.cljs @@ -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`