Fix a rare error regarding interactions (#9218)

This commit is contained in:
Sammy
2023-03-12 18:28:25 +01:00
committed by GitHub
parent df68520319
commit e15b70f79a

View File

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