Don't use seq operations for string includes operation

This commit is contained in:
Andrey Antukh 2025-02-04 16:46:09 +01:00
parent b6e26d15e1
commit 0fee8143dd

View file

@ -144,11 +144,13 @@
{::mf/wrap-props false}
[{:keys [on-click token theme-token full-applied on-context-menu half-applied selected-shapes token-type-props active-theme-tokens]}]
(let [{:keys [name value errors]} token
is-reference (some #(= % "{") value)
is-reference? (str/includes? value "{")
can-edit? (:can-edit (deref refs/permissions))
is-viewer (not can-edit?)
ref-not-in-active-set (and is-reference
ref-not-in-active-set (and is-reference?
(not (contains-reference-value? value (keys active-theme-tokens))))
no-valid-value (seq errors)
errors? (or ref-not-in-active-set