From 2f00fe2b1b7b436b0441cc1a564fd8ab2cf9372d Mon Sep 17 00:00:00 2001 From: Surma Date: Fri, 21 May 2021 15:14:22 +0100 Subject: [PATCH] =?UTF-8?q?I=E2=80=99m=20an=20idiot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/lazy-app/Compress/index.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/client/lazy-app/Compress/index.tsx b/src/client/lazy-app/Compress/index.tsx index 6d4a9c8b..bfb8a032 100644 --- a/src/client/lazy-app/Compress/index.tsx +++ b/src/client/lazy-app/Compress/index.tsx @@ -113,10 +113,8 @@ async function decodeImage( } // If none of those work, let’s see if Web Codecs API is available if (await WebCodecs.isTypeSupported(mimeType)) { - let result; try { - result = await abortable(signal, WebCodecs.decode(blob, mimeType)); - return result; + return await abortable(signal, WebCodecs.decode(blob, mimeType)); } catch (e) {} } // Otherwise fall through and try built-in decoding for a laugh.