We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a7cf780 + 278de0c commit 4307999Copy full SHA for 4307999
src/adapters/controllers/get-models.js
@@ -1,4 +1,5 @@
1
'use strict'
2
+import { Readable, Transform } from 'stream'
3
import getContent from './get-content'
4
5
/**
@@ -16,7 +17,10 @@ export default function getModelsFactory (listModels) {
16
17
writable: httpRequest.res
18
})
19
- if (!models) {
20
+ if (
21
+ models?.length > 0 &&
22
+ (models[0] instanceof Readable || models[0] instanceof Transform)
23
+ ) {
24
httpRequest.stream = true
25
return
26
}
0 commit comments