0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-06 14:50:20 -05:00

Replace generic arg name

This commit is contained in:
Florian Schroedl 2024-10-02 14:10:41 +02:00
parent 041e04dcb1
commit b12d5938e0

View file

@ -856,13 +856,13 @@
(defmethod process-change :mod-token-set
[data {:keys [name token-set]}]
(update data :tokens-lib (fn [element]
(update data :tokens-lib (fn [lib]
(let [path-changed? (not= name (:name token-set))
lib (-> element
(ctob/ensure-tokens-lib)
(ctob/update-set name (fn [prev-set]
(merge prev-set (dissoc token-set :tokens)))))]
(cond-> lib
lib' (-> lib
(ctob/ensure-tokens-lib)
(ctob/update-set name (fn [prev-set]
(merge prev-set (dissoc token-set :tokens)))))]
(cond-> lib'
path-changed? (ctob/update-set-name name (:name token-set)))))))
(defmethod process-change :del-token-set