mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +00:00
🐛 Fix validation of shadow token with missing keys (#8507)
This commit is contained in:
parent
7066afa01a
commit
31478c6afc
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user