From e15b70f79aa1e1a1fa9bf746dd97e938fa82cf94 Mon Sep 17 00:00:00 2001 From: Sammy <45788465+SammyWhamy@users.noreply.github.com> Date: Sun, 12 Mar 2023 18:28:25 +0100 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 46fa95816..59b80d8bc 100644 --- a/src/rest/RequestHandler.js +++ b/src/rest/RequestHandler.js @@ -11,7 +11,7 @@ const { } = require('../util/Constants'); 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.buffer(); }