mirror of
https://github.com/penpot/penpot.git
synced 2025-01-04 13:50:12 -05:00
🐛 Fix silent crash uploading a font too big
This commit is contained in:
parent
99f4ec788b
commit
090a3b1c63
1 changed files with 3 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
|||
[app.common.media :as cm]
|
||||
[app.main.data.fonts :as df]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.data.notifications :as ntf]
|
||||
[app.main.repo :as rp]
|
||||
[app.main.store :as st]
|
||||
[app.main.ui.components.context-menu-a11y :refer [context-menu*]]
|
||||
|
@ -109,6 +110,8 @@
|
|||
(swap! uploading* disj id)
|
||||
(st/emit! (df/add-font font)))
|
||||
(fn [error]
|
||||
(st/emit! (ntf/error (tr "errors.bad-font" (first (:names item)))))
|
||||
(swap! fonts* dissoc id)
|
||||
(js/console.log "error" error))))))
|
||||
|
||||
on-upload
|
||||
|
|
Loading…
Reference in a new issue