mirror of
https://github.com/penpot/penpot.git
synced 2025-08-02 01:48:29 +02:00
🐛 Fix encoding and decoding issue with tokens lib type
This commit is contained in:
parent
793c01a0a1
commit
d6e0001ac4
1 changed files with 5 additions and 2 deletions
|
@ -1255,8 +1255,11 @@ Will return a value that matches this schema:
|
|||
{:type ::tokens-lib
|
||||
:pred valid-tokens-lib?
|
||||
:type-properties
|
||||
{:encode/json export-dtcg-json
|
||||
:decode/json parse-multi-set-dtcg-json}}))
|
||||
;; NOTE: we can't assign statically at eval time the value of a
|
||||
;; function that is declared but not defined; so we need to pass
|
||||
;; an anonymous function and delegate the resolution to runtime
|
||||
{:encode/json #(export-dtcg-json %)
|
||||
:decode/json #(parse-multi-set-dtcg-json %)}}))
|
||||
|
||||
(defn duplicate-set [set-name lib & {:keys [suffix]}]
|
||||
(let [sets (get-sets lib)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue