diff --git a/frontend/src/app/main/ui/workspace/tokens/form.cljs b/frontend/src/app/main/ui/workspace/tokens/form.cljs index 27f025829f..e58c3b6ea3 100644 --- a/frontend/src/app/main/ui/workspace/tokens/form.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/form.cljs @@ -83,7 +83,7 @@ (let [{:keys [errors resolved-value] :as resolved-token} (get resolved-tokens token-id)] (cond resolved-value (p/resolved resolved-token) - (= #{:style-dictionary/missing-reference} errors) (p/rejected :error/token-missing-reference) + (sd/missing-reference-error? errors) (p/rejected :error/token-missing-reference) :else (p/rejected :error/unknown-error)))))))))) (defn use-debonced-resolve-callback diff --git a/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs b/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs index 0b9071a703..9a5a38ee4f 100644 --- a/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs @@ -77,6 +77,11 @@ errors) (str/join "\n"))) +(defn missing-reference-error? + [errors] + (and (set? errors) + (get errors :style-dictionary/missing-reference))) + (defn tokens-name-map [tokens] (->> tokens (map (fn [[_ x]] [(:name x) x]))