mirror of
https://github.com/outline/outline.git
synced 2025-03-14 10:07:11 +00:00
fix: API middleware wrapper triggers on JSZip stream (#8683)
This commit is contained in:
@ -11,7 +11,10 @@ export default function apiResponse() {
|
||||
typeof ctx.body === "object" &&
|
||||
!(ctx.body instanceof Readable) &&
|
||||
!(ctx.body instanceof stream.Readable) &&
|
||||
!(ctx.body instanceof Buffer)
|
||||
!(ctx.body instanceof Buffer) &&
|
||||
// JSZip returns a wrapped stream instance that is not a true readable stream
|
||||
// and not exported from the module either, so we must identify it like so.
|
||||
!(ctx.body && "_readableState" in ctx.body)
|
||||
) {
|
||||
ctx.body = {
|
||||
...ctx.body,
|
||||
|
Reference in New Issue
Block a user