0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 07:50:43 -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 (defmethod process-change :mod-token-set
[data {:keys [name 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)) (let [path-changed? (not= name (:name token-set))
lib (-> element lib' (-> lib
(ctob/ensure-tokens-lib) (ctob/ensure-tokens-lib)
(ctob/update-set name (fn [prev-set] (ctob/update-set name (fn [prev-set]
(merge prev-set (dissoc token-set :tokens)))))] (merge prev-set (dissoc token-set :tokens)))))]
(cond-> lib (cond-> lib'
path-changed? (ctob/update-set-name name (:name token-set))))))) path-changed? (ctob/update-set-name name (:name token-set)))))))
(defmethod process-change :del-token-set (defmethod process-change :del-token-set