Skip to content

Commit e5a2896

Browse files
Fix: return body as async iterable for isomorphic-git
1 parent 599c775 commit e5a2896

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,13 +443,18 @@
443443
body
444444
});
445445

446+
// Return response in format isomorphic-git expects
447+
const responseBody = new Uint8Array(await res.arrayBuffer());
448+
446449
return {
447450
url: res.url,
448451
method,
449452
statusCode: res.status,
450453
statusMessage: res.statusText,
451454
headers: Object.fromEntries(res.headers.entries()),
452-
body: [new Uint8Array(await res.arrayBuffer())]
455+
body: (async function* () {
456+
yield responseBody;
457+
})()
453458
};
454459
}
455460
};

0 commit comments

Comments
 (0)