graphql-http 1.22.2 → 1.22.4
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/handler.js
CHANGED
|
@@ -19,9 +19,9 @@ function isResponse(val) {
|
|
|
19
19
|
return false;
|
|
20
20
|
// Make sure the contents of init match ResponseInit
|
|
21
21
|
const init = val[1];
|
|
22
|
-
if (typeof init.status !== 'number')
|
|
22
|
+
if (init.status && typeof init.status !== 'number')
|
|
23
23
|
return false;
|
|
24
|
-
if (typeof init.statusText !== 'string')
|
|
24
|
+
if (init.statusText && typeof init.statusText !== 'string')
|
|
25
25
|
return false;
|
|
26
26
|
if (init.headers && !(0, utils_1.isObject)(init.headers))
|
|
27
27
|
return false;
|
package/lib/handler.mjs
CHANGED
|
@@ -16,9 +16,9 @@ function isResponse(val) {
|
|
|
16
16
|
return false;
|
|
17
17
|
// Make sure the contents of init match ResponseInit
|
|
18
18
|
const init = val[1];
|
|
19
|
-
if (typeof init.status !== 'number')
|
|
19
|
+
if (init.status && typeof init.status !== 'number')
|
|
20
20
|
return false;
|
|
21
|
-
if (typeof init.statusText !== 'string')
|
|
21
|
+
if (init.statusText && typeof init.statusText !== 'string')
|
|
22
22
|
return false;
|
|
23
23
|
if (init.headers && !isObject(init.headers))
|
|
24
24
|
return false;
|