From b16423b51ca1a1ac51bc5ea0101a0969b3fc4af0 Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sun, 12 Mar 2023 11:19:37 +0700 Subject: [PATCH] Fix a rare error regarding interactions #9218 --- src/rest/RequestHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rest/RequestHandler.js b/src/rest/RequestHandler.js index 08ecf3a..9d3c07a 100644 --- a/src/rest/RequestHandler.js +++ b/src/rest/RequestHandler.js @@ -40,7 +40,7 @@ const captchaMessage = [ ]; function parseResponse(res) { - if (res.headers.get('content-type').startsWith('application/json')) return res.json(); + if (res.headers.get('content-type')?.startsWith('application/json')) return res.json(); return res.arrayBuffer(); // Cre: TheDevYellowy }