Skip to content

Commit

Permalink
fix: Fix payload normalization (#1332)
Browse files Browse the repository at this point in the history
  • Loading branch information
trsrm authored Feb 15, 2022
1 parent febfe77 commit e9e8169
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lambda/routes/invocations/invocationsRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export default function invocationsRoute(lambda, options, v3Utils) {
let statusCode = 200
let functionError = null
if (invokeResults) {
resultPayload = invokeResults.Payload || ''
const isPayloadDefined = typeof invokeResults.Payload !== 'undefined'
resultPayload = isPayloadDefined ? invokeResults.Payload : ''
statusCode = invokeResults.StatusCode || 200
functionError = invokeResults.FunctionError || null
}
Expand Down

0 comments on commit e9e8169

Please sign in to comment.