mirror of
https://github.com/penpot/penpot.git
synced 2026-04-30 13:49:06 +00:00
Two coupled defects made shape.applyToken(), token.applyToShapes() and token.applyToSelected() silently no-op when invoked from JavaScript with an array of strings (e.g. token.applyToShapes([rect], ["fill"])): 1. token-attr-plugin->token-attr only consulted its alias map when the input was already a keyword; string inputs fell through unchanged, causing downstream token-attr? to return false. 2. The inner schemas used plain [:set ...] which lacks the :decode/json transformer for JS array -> Clojure set coercion. Switching to Penpot's custom [::sm/set ...] lets the standard JSON decoder pipeline handle the conversion automatically. This is a backport of commit 1eac3e2be5f973359ad2ec9bac4e80a9d5a9e022 which fixes GitHub #9162. Signed-off-by: Andrey Antukh <niwi@niwi.nz>