@rg-dev/stdlib 1.0.31 → 1.0.32
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.
- package/lib/common-env.cjs +1 -1
- package/lib/common-env.js +1 -1
- package/package.json +1 -1
package/lib/common-env.cjs
CHANGED
|
@@ -107,7 +107,7 @@ async function fetchHelperText(url, config) {
|
|
|
107
107
|
return await res.text();
|
|
108
108
|
}
|
|
109
109
|
function throwIfNotJSONResponse(res) {
|
|
110
|
-
const contentType = res.headers
|
|
110
|
+
const contentType = res.headers.get("content-type");
|
|
111
111
|
if (!(contentType == null ? void 0 : contentType.toLowerCase().includes("application/json"))) {
|
|
112
112
|
throw new Error(`Response is not JSON (content-type: ${contentType}, URL: ${res.url})`);
|
|
113
113
|
}
|
package/lib/common-env.js
CHANGED
|
@@ -70,7 +70,7 @@ async function fetchHelperText(url, config) {
|
|
|
70
70
|
return await res.text();
|
|
71
71
|
}
|
|
72
72
|
function throwIfNotJSONResponse(res) {
|
|
73
|
-
const contentType = res.headers
|
|
73
|
+
const contentType = res.headers.get("content-type");
|
|
74
74
|
if (!(contentType == null ? void 0 : contentType.toLowerCase().includes("application/json"))) {
|
|
75
75
|
throw new Error(`Response is not JSON (content-type: ${contentType}, URL: ${res.url})`);
|
|
76
76
|
}
|