Remove Promise.all from font loading
This commit is contained in:
parent
073dee9efd
commit
f4447b3474
@ -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: [{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user