diff --git a/.eslintrc.json b/.eslintrc.json index e5f0cc94..990e0581 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,7 +4,7 @@ "es2020": true, "node": true }, - "extends": ["eslint:recommended", "plugin:react/recommended", "prettier", "next"], + "extends": ["eslint:recommended", "plugin:react/recommended", "prettier"], "parserOptions": { "ecmaFeatures": { "jsx": true diff --git a/lib/request.js b/lib/request.js index 89e9c655..ba1c799b 100644 --- a/lib/request.js +++ b/lib/request.js @@ -88,7 +88,7 @@ export async function getClientInfo(req, { screen }) { } export function getJsonBody(req) { - if (req.headers['content-type'].indexOf('text/plain') !== -1) { + if ((req.headers['content-type'] || '').indexOf('text/plain') !== -1) { return JSON.parse(req.body); }