I’m an idiot

This commit is contained in:
Surma
2021-05-21 15:14:22 +01:00
parent 118885cd26
commit 2f00fe2b1b

View File

@ -113,10 +113,8 @@ async function decodeImage(
}
// If none of those work, lets 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.