await in async function

This commit is contained in:
0x1eef 2023-03-11 08:11:52 -03:00
parent 7b27a645ab
commit e96795f077

View file

@ -5,7 +5,9 @@ export default function(
return Promise.all(
(fonts || []).map(async (font) => {
return new FontFace(...font).load().then((font) => reporter<FontFace>(font));
return await new FontFace(...font)
.load()
.then((font) => reporter<FontFace>(font));
})
);
}