await in async function
This commit is contained in:
parent
7b27a645ab
commit
e96795f077
1 changed files with 3 additions and 1 deletions
|
@ -5,7 +5,9 @@ export default function(
|
||||||
|
|
||||||
return Promise.all(
|
return Promise.all(
|
||||||
(fonts || []).map(async (font) => {
|
(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));
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue