File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -251,15 +251,15 @@ function translateLambdaResultIfNeeded(result, isV1) {
251
251
return result ;
252
252
}
253
253
254
- if ( ! result . statusCode && ( typeof result === 'object' || typeof result === 'string' ) ) {
254
+ if ( ( ! result || ! result . statusCode ) && ( typeof result === 'object' || typeof result === 'string' || typeof result === 'undefined ') ) {
255
255
return {
256
- " isBase64Encoded" : false ,
257
- " statusCode" : 200 ,
258
- " body" : JSON . stringify ( result ) ,
259
- " headers" : {
260
- " content-type" : " application/json"
256
+ isBase64Encoded : false ,
257
+ statusCode : 200 ,
258
+ body : typeof result === 'undefined' ? undefined : JSON . stringify ( result ) ,
259
+ headers : {
260
+ ' content-type' : ' application/json'
261
261
}
262
- }
262
+ } ;
263
263
}
264
264
265
265
return result || { } ;
You can’t perform that action at this time.
0 commit comments