mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-09 03:26:38 +08:00
fix: try avoid duplex error
This commit is contained in:
parent
20738d9deb
commit
d94d6f75cd
@ -55,7 +55,8 @@ export function createFetchWithProxyByNextUndici({
|
||||
let agent: any;
|
||||
return async (...args) => {
|
||||
const init = (args[1] ||= {});
|
||||
if (init.body instanceof ReadableStream) {
|
||||
// better check instanceof ReadableStream
|
||||
if (init.body) {
|
||||
// https://github.com/nodejs/node/issues/46221
|
||||
(init as any).duplex ||= "half";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user