diff --git a/public/src/modules/api.js b/public/src/modules/api.js index 0993a8de66..bfda975662 100644 --- a/public/src/modules/api.js +++ b/public/src/modules/api.js @@ -65,7 +65,8 @@ async function xhr(options, cb) { const res = await fetch(url, options); const { headers } = res; - const isJSON = headers.get('content-type').startsWith('application/json'); + const contentType = headers.get('content-type'); + const isJSON = contentType && contentType.startsWith('application/json'); let response; if (isJSON) {