mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 10:15:43 +03:00
remove redundant Promise.all
This commit is contained in:
parent
bbd785b158
commit
59a1df71c8
1 changed files with 3 additions and 8 deletions
|
@ -140,14 +140,9 @@ async function createThumbnail(
|
|||
}
|
||||
|
||||
const imageData = context.getImageData(0, 0, targetWidth, targetHeight);
|
||||
|
||||
const [
|
||||
thumbnail,
|
||||
blurhash,
|
||||
] = await Promise.all([
|
||||
thumbnailPromise,
|
||||
BlurhashEncoder.instance.getBlurhash(imageData),
|
||||
]);
|
||||
// thumbnailPromise and blurhash promise are being awaited concurrently
|
||||
const blurhash = await BlurhashEncoder.instance.getBlurhash(imageData);
|
||||
const thumbnail = await thumbnailPromise;
|
||||
|
||||
return {
|
||||
info: {
|
||||
|
|
Loading…
Reference in a new issue