From 01575b084352b5c1e59ade711a13ef49b28c3376 Mon Sep 17 00:00:00 2001 From: SpreedBLood Date: Sat, 13 Mar 2021 21:14:31 +0100 Subject: [PATCH] Fix 404 from URLs --- src/utils/FileUtilities.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/FileUtilities.ts b/src/utils/FileUtilities.ts index f6d85ee..53932f5 100644 --- a/src/utils/FileUtilities.ts +++ b/src/utils/FileUtilities.ts @@ -19,6 +19,8 @@ export class FileUtilities const data = await fetch.default(url); const arrayBuffer = await data.arrayBuffer(); + if(data.headers.get('Content-Type') === 'text/html') return; + if(arrayBuffer) content = Buffer.from(arrayBuffer); } else