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(); }