0
Fork 0
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:
Pablo Alba 2024-12-26 16:17:46 +01:00
parent 99f4ec788b
commit 090a3b1c63

View file

@ -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