Handle failures

This commit is contained in:
Eric Bailey
2024-09-18 19:51:07 -05:00
parent a6ea8fb57b
commit 7df3fca3ce
3 changed files with 12 additions and 4 deletions
+1 -1
View File
@@ -439,7 +439,7 @@
InterExtraBoldItalic.load();
InterBlack.load();
InterBlackItalic.load();
} catch () {}
} catch (e) {}
</script>
{% block html_head_extra -%}{%- endblock %}
+10 -2
View File
@@ -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]
+1 -1
View File
@@ -433,7 +433,7 @@
InterExtraBoldItalic.load();
InterBlack.load();
InterBlackItalic.load();
} catch () {}
} catch (e) {}
</script>
</head>