From e96795f077942b3fb6926838e0cd80239f1d2d94 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sat, 11 Mar 2023 08:11:52 -0300 Subject: [PATCH] await in async function --- src/js/lib/WebPackage/FontLoader.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/lib/WebPackage/FontLoader.ts b/src/js/lib/WebPackage/FontLoader.ts index 8e92dd3..ef7eca7 100644 --- a/src/js/lib/WebPackage/FontLoader.ts +++ b/src/js/lib/WebPackage/FontLoader.ts @@ -5,7 +5,9 @@ export default function( return Promise.all( (fonts || []).map(async (font) => { - return new FontFace(...font).load().then((font) => reporter(font)); + return await new FontFace(...font) + .load() + .then((font) => reporter(font)); }) ); }