@qrvey/fetch
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -141,3 +141,4 @@ 'use strict'; | ||
static async handleResponse(response) { | ||
const isJsonResponse = response.headers.get("content-type") === "application/json"; | ||
const responseContentType = response.headers.get("content-type"); | ||
const isJsonResponse = responseContentType && responseContentType.includes("application/json"); | ||
const responseData = await (isJsonResponse ? response.json() : response.text()); | ||
@@ -144,0 +145,0 @@ if (response.ok) |
@@ -5,3 +5,3 @@ { | ||
"main": "dist/cjs/index.js", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
44884
442