diff --git a/bskyweb/templates/base.html b/bskyweb/templates/base.html index 77cd354ce4..9eb6272ae5 100644 --- a/bskyweb/templates/base.html +++ b/bskyweb/templates/base.html @@ -439,7 +439,7 @@ InterExtraBoldItalic.load(); InterBlack.load(); InterBlackItalic.load(); - } catch () {} + } catch (e) {} {% block html_head_extra -%}{%- endblock %} diff --git a/src/alf/util/useFonts.web.ts b/src/alf/util/useFonts.web.ts index a4a928c453..bf9ab931cf 100644 --- a/src/alf/util/useFonts.web.ts +++ b/src/alf/util/useFonts.web.ts @@ -4,9 +4,17 @@ export function useFonts() { const [loaded, setLoaded] = React.useState(false) React.useEffect(() => { - document.fonts.ready.then(() => { + try { + document.fonts.ready + .then(() => { + setLoaded(true) + }) + .catch(() => { + setLoaded(true) + }) + } catch (e) { setLoaded(true) - }) + } }, [setLoaded]) return [loaded, null] diff --git a/web/index.html b/web/index.html index 4d104cde38..a7e12cc7c0 100644 --- a/web/index.html +++ b/web/index.html @@ -433,7 +433,7 @@ InterExtraBoldItalic.load(); InterBlack.load(); InterBlackItalic.load(); - } catch () {} + } catch (e) {}