0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

🐛 Add warning when font cannot be found

This commit is contained in:
alonso.torres 2024-04-26 12:16:05 +02:00
parent bebdc78ce6
commit 3a71068a48

View file

@ -133,7 +133,10 @@
(defn- fetch-gfont-css
[url]
(->> (http/send! {:method :get :uri url :mode :cors :response-type :text})
(rx/map :body)))
(rx/map :body)
(rx/catch (fn [err]
(.warn js/console "Cannot find the font" (obj/get err "message"))
(rx/empty)))))
(defmethod load-font :google
[{:keys [id ::on-loaded] :as font}]