mirror of
https://github.com/outline/outline.git
synced 2026-12-02 01:34:47 +03:00
fix: API middleware wrapper triggers on JSZip stream (#8683)
This commit is contained in:
1 parent
6ea4ce72ec
commit
5a1aeed989
1 file changed
+4
-1
@@ -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