Closed Airkro closed 9 months ago
After import 'ky' (> 0.31.1), the Error: unsupported BodyInit type will block all code runs.
unsupported BodyInit type
Since: v0.31.2
export const supportsStreams = (() => { let duplexAccessed = false; let hasContentType = false; const supportsReadableStream = typeof globalThis.ReadableStream === 'function'; if (supportsReadableStream) { hasContentType = new globalThis.Request('', { body: new globalThis.ReadableStream(), // <--- this error trigger error method: 'POST', get duplex() { duplexAccessed = true; return 'half'; }, }).headers.has('Content-Type'); } return duplexAccessed && !hasContentType; })();
Can we skip this step?
What runtimes?
After import 'ky' (> 0.31.1), the Error:
unsupported BodyInit type
will block all code runs.Since: v0.31.2
Can we skip this step?