mirror of
https://github.com/penpot/penpot.git
synced 2026-04-27 04:08:23 +00:00
🐛 Fix typography style creation with tokenized line-height (#9121)
When a text element has a line-height coming from a design token, the value may be a number (e.g. 1.5) and fails frontend data validation expecting a string. Normalize line-height before creating the typography style so the operation succeeds without throwing an assertion error. Signed-off-by: juan-flores077 <toptalent399@gmail.com>
This commit is contained in:
parent
6c7843f4b6
commit
841b2e156e
@ -78,7 +78,7 @@
|
||||
- Fix copy to be more specific [Taiga #13990](https://tree.taiga.io/project/penpot/issue/13990)
|
||||
- Allow deleting the profile avatar after uploading [Github #9067](https://github.com/penpot/penpot/issues/9067)
|
||||
- Fix incorrect rendering when exporting text as SVG, PNG and JPG (by @edwin-rivera-dev) [Github #8516](https://github.com/penpot/penpot/issues/8516)
|
||||
|
||||
- Fix typography style creation with tokenized line-height (by @juan-flores077) [Github #8479](https://github.com/penpot/penpot/issues/8479)
|
||||
|
||||
## 2.16.0 (Unreleased)
|
||||
|
||||
|
||||
@ -935,6 +935,12 @@
|
||||
(d/concat-vec txt/text-font-attrs
|
||||
txt/text-spacing-attrs
|
||||
txt/text-transform-attrs)))
|
||||
values (cond-> values
|
||||
(number? (:line-height values))
|
||||
(update :line-height str)
|
||||
|
||||
(number? (:letter-spacing values))
|
||||
(update :letter-spacing str))
|
||||
|
||||
typ-id (uuid/next)
|
||||
typ (-> (if multiple?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user