Skip to content

Commit e3e5c5a

Browse files
committed
fix decoded payload
1 parent 0a927eb commit e3e5c5a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/core/src/lambda/vue/remoteInvoke/invokeLambda.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,8 @@ export class RemoteInvokeWebview extends VueWebview {
294294
? await this.clientDebug.invoke(this.data.FunctionArn, input, qualifier)
295295
: await this.client.invoke(this.data.FunctionArn, input, qualifier)
296296
const logs = funcResponse.LogResult ? decodeBase64(funcResponse.LogResult) : ''
297-
const payload = funcResponse.Payload
298-
? new TextDecoder().decode(funcResponse.Payload)
299-
: JSON.stringify({})
297+
const decodedPayload = funcResponse.Payload ? new TextDecoder().decode(funcResponse.Payload) : ''
298+
const payload = decodedPayload || JSON.stringify({})
300299

301300
this.channel.appendLine(`Invocation result for ${this.data.FunctionArn}`)
302301
this.channel.appendLine('Logs:')

0 commit comments

Comments
 (0)