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) {
251251 return result ;
252252 }
253253
254- if ( ! result . statusCode && ( typeof result === 'object' || typeof result === 'string' ) ) {
254+ if ( ( ! result || ! result . statusCode ) && ( typeof result === 'object' || typeof result === 'string' || typeof result === 'undefined ') ) {
255255 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'
261261 }
262- }
262+ } ;
263263 }
264264
265265 return result || { } ;
You can’t perform that action at this time.
0 commit comments