From f4447b34749b687a445629e7719f8fef2c559d55 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Thu, 13 Mar 2025 00:23:43 -0500 Subject: [PATCH] Remove Promise.all from font loading --- src/app/font.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/font.ts b/src/app/font.ts index 27373932..cedf33ce 100644 --- a/src/app/font.ts +++ b/src/app/font.ts @@ -11,10 +11,9 @@ const getFontData = async (fontPath: string) => fs.readFileSync(path.join(cwd(), fontPath)); export const getIBMPlexMono = async () => { - const [regular, medium] = await Promise.all([ - getFontData(FONT_IBM_PLEX_MONO_PATH_REGULAR), - getFontData(FONT_IBM_PLEX_MONO_PATH_MEDIUM), - ]); + const regular = await getFontData(FONT_IBM_PLEX_MONO_PATH_REGULAR); + const medium = await getFontData(FONT_IBM_PLEX_MONO_PATH_MEDIUM); + return { fontFamily: FONT_IBM_PLEX_MONO_FAMILY, fonts: [{