mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 19:28:12 +00:00
🐛 Guard against nil variant-data in typography-item
When d/seek finds no matching font variant (e.g. the variant-id stored on the typography no longer exists in the font's variants list), variant-data is nil and (:name nil) produces nil, resulting in a malformed label like "14px | ". Fall back to "--" in that case.
This commit is contained in:
parent
e8547ab6dd
commit
8f30a95ca0
@ -64,7 +64,7 @@
|
||||
[:div {:class (stl/css :typography-font)}
|
||||
(:name font-data)]
|
||||
[:div {:class (stl/css :typography-data)}
|
||||
(str (:font-size typography) "px | " (:name variant-data))]]))
|
||||
(str (:font-size typography) "px | " (or (:name variant-data) "--"))]]))
|
||||
|
||||
(mf/defc palette*
|
||||
[{:keys [selected selected-ids current-file-id file-typographies libraries size width]}]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user