diff --git a/CHANGES.md b/CHANGES.md index ff49037c8f..546cca95b8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -32,6 +32,7 @@ - Fix viewer can update library [Taiga #13186](https://tree.taiga.io/project/penpot/issue/13186) - Fix remove fill affects different element than selected [Taiga #13128](https://tree.taiga.io/project/penpot/issue/13128) - Fix cannot apply second token after creation while shape is selected [Taiga #13513](https://tree.taiga.io/project/penpot/issue/13513) +- Fix error activating a set with invalid shadow token applied [Taiga #13528](https://tree.taiga.io/project/penpot/issue/13528) ## 2.13.3 diff --git a/frontend/src/app/main/data/style_dictionary.cljs b/frontend/src/app/main/data/style_dictionary.cljs index 474fa93552..63a076f93f 100644 --- a/frontend/src/app/main/data/style_dictionary.cljs +++ b/frontend/src/app/main/data/style_dictionary.cljs @@ -377,7 +377,15 @@ (defn- parse-single-shadow "Parses a single shadow map with properties: x, y, blur, spread, color, type." [shadow-map shadow-index] - (let [add-keyed-errors (fn [shadow-result k errors] + (let [shadow-map (merge {:offset-x nil ;; Ensure that all keys are processed, even if missing in the original token + :offset-y nil + :blur nil + :spread nil + :color nil + :inset false} + shadow-map) + + add-keyed-errors (fn [shadow-result k errors] (update shadow-result :errors concat (map #(assoc % :shadow-key k :shadow-index shadow-index) errors))) parsers {:offset-x parse-sd-token-general-value