From 59a1df71c834f7380ff4e19ecf4deca057c7a389 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 13 Jul 2021 17:05:57 +0100 Subject: [PATCH] remove redundant Promise.all --- src/ContentMessages.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/ContentMessages.tsx b/src/ContentMessages.tsx index 335784c65a..0c65a7bd35 100644 --- a/src/ContentMessages.tsx +++ b/src/ContentMessages.tsx @@ -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: {