mirror of
https://github.com/penpot/penpot.git
synced 2025-07-26 01:17:23 +02:00
🐛 Add warning when font cannot be found
This commit is contained in:
parent
bebdc78ce6
commit
3a71068a48
1 changed files with 4 additions and 1 deletions
|
@ -133,7 +133,10 @@
|
||||||
(defn- fetch-gfont-css
|
(defn- fetch-gfont-css
|
||||||
[url]
|
[url]
|
||||||
(->> (http/send! {:method :get :uri url :mode :cors :response-type :text})
|
(->> (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
|
(defmethod load-font :google
|
||||||
[{:keys [id ::on-loaded] :as font}]
|
[{:keys [id ::on-loaded] :as font}]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue