nextemos 4.3.7 → 4.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65,7 +65,9 @@ const fetchRequest = () => {
65
65
  };
66
66
  }
67
67
  let responseModel;
68
- if (headers['Content-Type'].includes('text/plain'))
68
+ if (Object.keys(headers).length > 0 &&
69
+ headers.hasOwnProperty('content-type') &&
70
+ headers['content-type'].includes('text/plain'))
69
71
  responseModel = yield response.text();
70
72
  else
71
73
  responseModel = yield response.json().catch(() => ({}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "4.3.7",
3
+ "version": "4.3.9",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",