fix: no more intensive error

This commit is contained in:
Julien Calixte
2026-01-20 23:01:57 +01:00
parent 5a36891970
commit 4a53a17de4

View File

@@ -20,7 +20,11 @@ export const downloadGoogleFont = async (font: string): Promise<void> => {
document.head.appendChild(link) document.head.appendChild(link)
} }
try {
await new FontFaceObserver(font).load() await new FontFaceObserver(font).load()
document.documentElement.style.setProperty("--font-family", font) document.documentElement.style.setProperty("--font-family", font)
} catch (error) {
console.warn("error when loading font")
}
} }