From 4ee5572d2fecc21ff08772b4c2d2bdeb41929ffb Mon Sep 17 00:00:00 2001 From: Surma Date: Fri, 20 Jul 2018 11:12:42 +0100 Subject: [PATCH] =?UTF-8?q?Jake=E2=80=99s=20thoroughness=20is=20doing=20my?= =?UTF-8?q?=20head=20in=20:P?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/codecs/decoders.ts | 2 +- src/lib/util.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/codecs/decoders.ts b/src/codecs/decoders.ts index 01a4ff36..0a739d51 100644 --- a/src/codecs/decoders.ts +++ b/src/codecs/decoders.ts @@ -26,7 +26,7 @@ export const decodersPromise: Promise = Promise.all( // values here. ).then(list => list.filter(item => !!item)) as any as Promise; -export async function findDecodersByMimeType(mimeType: string): Promise { +async function findDecodersByMimeType(mimeType: string): Promise { const decoders = await decodersPromise; return decoders.filter(decoder => decoder.canHandleMimeType(mimeType)); } diff --git a/src/lib/util.ts b/src/lib/util.ts index fbd92e8d..fe67df9e 100644 --- a/src/lib/util.ts +++ b/src/lib/util.ts @@ -134,7 +134,7 @@ export async function sniffMimeType(blob: Blob): Promise { Array.from(new Uint8Array(firstChunk)) .map(v => String.fromCodePoint(v)) .join(''); - for (const [detector, mimeType] of magicNumberToMimeType.entries()) { + for (const [detector, mimeType] of magicNumberToMimeType) { if (detector.test(firstChunkString)) { return mimeType; }