Skip to content

Commit

Permalink
fix: Prevent "A network error occurred." in console when using web fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
MurakamiShinyu committed Oct 11, 2024
1 parent 925d17f commit 5cd0afc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/vivliostyle/font.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@ export class Mapper {
fonts.forEach((fontFace) => {
if (fontFace.status === "unloaded") {
unloadedCount++;
fontFace.load();
fontFace.load().catch((e) => {
// Prevent "A network error occurred." errors in console
});
}
});
if (unloadedCount === 0) {
Expand Down

0 comments on commit 5cd0afc

Please sign in to comment.