File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -122,14 +122,14 @@ module.exports = (app, options) => {
122
122
headers : { }
123
123
} )
124
124
}
125
- const stream = res . stream ( )
125
+ const stream = res && res . stream ( )
126
126
return resolve ( {
127
127
meta : {
128
128
statusCode : 500 ,
129
129
headers : { }
130
130
} ,
131
131
// fix issue with Lambda where streaming repsonses always require a body to be present
132
- stream : stream . readableLength > 0 ? stream : require ( 'node:stream' ) . Readable . from ( '' )
132
+ stream : stream && stream . readableLength > 0 ? stream : require ( 'node:stream' ) . Readable . from ( '' )
133
133
} )
134
134
}
135
135
// chunked transfer not currently supported by API Gateway
@@ -177,7 +177,7 @@ module.exports = (app, options) => {
177
177
resolve ( {
178
178
meta : ret ,
179
179
// fix issue with Lambda where streaming repsonses always require a body to be present
180
- stream : stream . readableLength > 0 ? stream : require ( 'node:stream' ) . Readable . from ( '' )
180
+ stream : stream && stream . readableLength > 0 ? stream : require ( 'node:stream' ) . Readable . from ( '' )
181
181
} )
182
182
} )
183
183
} )
You can’t perform that action at this time.
0 commit comments