diff --git a/CHANGES.md b/CHANGES.md index 573dc6843..887eec0a8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,7 @@ - Fix error when moving nested frames outside [Taiga #4017](https://tree.taiga.io/project/penpot/issue/4017) - Fix problem when hovering over nested frames [Taiga #4018](https://tree.taiga.io/project/penpot/issue/4018) - Fix problem editing rotated texts [Taiga #4026](https://tree.taiga.io/project/penpot/issue/4026) +- Fix problem with texts for non existing fonts [Taiga #4087](https://tree.taiga.io/project/penpot/issue/4087) ## 1.15.2-beta diff --git a/frontend/src/app/util/http.cljs b/frontend/src/app/util/http.cljs index adfb5aece..e468ba1fa 100644 --- a/frontend/src/app/util/http.cljs +++ b/frontend/src/app/util/http.cljs @@ -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) diff --git a/frontend/src/app/util/text_svg_position.cljs b/frontend/src/app/util/text_svg_position.cljs index 6957d64fd..aa91a8174 100644 --- a/frontend/src/app/util/text_svg_position.cljs +++ b/frontend/src/app/util/text_svg_position.cljs @@ -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]