0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-13 16:21:57 -05:00

🐛 Fix empty font-family handling on custom fonts page.

This commit is contained in:
Andrey Antukh 2021-05-27 13:21:37 +02:00
parent 69ea8229ca
commit ca5c374ecd
2 changed files with 5 additions and 4 deletions

View file

@ -89,7 +89,7 @@
{:content {:data (js/Uint8Array. data)
:name name
:type type}
:font-family family
:font-family (or family "")
:font-weight (cm/parse-font-weight variant)
:font-style (cm/parse-font-style variant)}))

View file

@ -192,9 +192,10 @@
on-save
(fn [event]
(let [font-family @state]
(st/emit! (df/update-font
{:id font-id
:name font-family}))
(when-not (str/blank? font-family)
(st/emit! (df/update-font
{:id font-id
:name font-family})))
(reset! edit? false)))
on-key-down