Skip to content

Commit 4307999

Browse files
committed
2 parents a7cf780 + 278de0c commit 4307999

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/adapters/controllers/get-models.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict'
2+
import { Readable, Transform } from 'stream'
23
import getContent from './get-content'
34

45
/**
@@ -16,7 +17,10 @@ export default function getModelsFactory (listModels) {
1617
writable: httpRequest.res
1718
})
1819

19-
if (!models) {
20+
if (
21+
models?.length > 0 &&
22+
(models[0] instanceof Readable || models[0] instanceof Transform)
23+
) {
2024
httpRequest.stream = true
2125
return
2226
}

0 commit comments

Comments
 (0)