mirror of
https://github.com/penpot/penpot.git
synced 2025-05-30 02:16:10 +02:00
🐛 Fix problem with texts for non existing fonts
This commit is contained in:
parent
00a7760c0f
commit
c47f5ca186
3 changed files with 4 additions and 2 deletions
|
@ -181,7 +181,7 @@
|
|||
(rx/tap
|
||||
(fn [resp]
|
||||
(when (or (< (:status resp) 200) (>= (:status resp) 300))
|
||||
(rx/throw (js/Error. "Error fetching data uri" #js {:cause (clj->js resp)})))))
|
||||
(throw (js/Error. "Error fetching data uri" #js {:cause (clj->js resp)})))))
|
||||
|
||||
(rx/map :body)
|
||||
(rx/mapcat wapi/read-file-as-data-url)
|
||||
|
|
|
@ -56,7 +56,8 @@
|
|||
|
||||
(-> (fonts/ensure-loaded! font-id)
|
||||
(p/then #(when (not (dom/check-font? font))
|
||||
(load-font font))))))
|
||||
(load-font font)))
|
||||
(p/catch #(.error js/console (dm/str "Cannot load font" font-id) %)))))
|
||||
|
||||
(defn- calc-text-node-positions
|
||||
[shape-id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue