mirror of
https://github.com/penpot/penpot.git
synced 2025-05-14 20:36:37 +02:00
🐛 Fix empty font-family handling on custom fonts page.
This commit is contained in:
parent
69ea8229ca
commit
ca5c374ecd
2 changed files with 5 additions and 4 deletions
|
@ -89,7 +89,7 @@
|
||||||
{:content {:data (js/Uint8Array. data)
|
{:content {:data (js/Uint8Array. data)
|
||||||
:name name
|
:name name
|
||||||
:type type}
|
:type type}
|
||||||
:font-family family
|
:font-family (or family "")
|
||||||
:font-weight (cm/parse-font-weight variant)
|
:font-weight (cm/parse-font-weight variant)
|
||||||
:font-style (cm/parse-font-style variant)}))
|
:font-style (cm/parse-font-style variant)}))
|
||||||
|
|
||||||
|
|
|
@ -192,9 +192,10 @@
|
||||||
on-save
|
on-save
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(let [font-family @state]
|
(let [font-family @state]
|
||||||
(st/emit! (df/update-font
|
(when-not (str/blank? font-family)
|
||||||
{:id font-id
|
(st/emit! (df/update-font
|
||||||
:name font-family}))
|
{:id font-id
|
||||||
|
:name font-family})))
|
||||||
(reset! edit? false)))
|
(reset! edit? false)))
|
||||||
|
|
||||||
on-key-down
|
on-key-down
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue