diff --git a/common/src/app/common/types/tokens_lib.cljc b/common/src/app/common/types/tokens_lib.cljc index af681f47a..8249b9a8a 100644 --- a/common/src/app/common/types/tokens_lib.cljc +++ b/common/src/app/common/types/tokens_lib.cljc @@ -1251,7 +1251,8 @@ Will return a value that matches this schema: (update "sets" keys))))) active-sets (get metadata "activeSets") active-themes (get metadata "activeThemes") - themes-data (if (empty? active-themes) + themes-data (if (and (seq active-sets) + (empty? active-themes)) (conj themes-data {"name" hidden-token-theme-name "group" "" "description" nil diff --git a/common/test/common_tests/types/data/tokens-multi-set-example.json b/common/test/common_tests/types/data/tokens-multi-set-example.json index 547f8f901..cf94c1f2d 100644 --- a/common/test/common_tests/types/data/tokens-multi-set-example.json +++ b/common/test/common_tests/types/data/tokens-multi-set-example.json @@ -805,6 +805,8 @@ "selectedTokenSets": {"light": "enabled"} } ], "$metadata": { - "tokenSetOrder": ["core", "light", "dark", "theme"] + "tokenSetOrder": ["core", "light", "dark", "theme"], + "activeSets": {}, + "activeThemes": {} } } diff --git a/common/test/common_tests/types/tokens_lib_test.cljc b/common/test/common_tests/types/tokens_lib_test.cljc index e6b60cfbb..82d109de0 100644 --- a/common/test/common_tests/types/tokens_lib_test.cljc +++ b/common/test/common_tests/types/tokens_lib_test.cljc @@ -1241,7 +1241,8 @@ "modified-at" now "name" "theme-1" "selectedTokenSets" {"core" "enabled"}}] - "$metadata" {"tokenSetOrder" ["core"]} + "$metadata" {"tokenSetOrder" ["core"] + "activeSets" #{}, "activeThemes" #{}} "core" {"colors" {"red" {"600" {"$value" "#e53e3e" "$type" "color"