From 24a5b51f55863f270c11860569ac7a1b3ffcf7f7 Mon Sep 17 00:00:00 2001 From: ljacobsson Date: Thu, 10 Aug 2023 15:01:08 +0200 Subject: [PATCH] [samp local] fix for null-responses --- package.json | 2 +- src/commands/local/lib/event-router.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e159d08..ca39c02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "samp-cli", - "version": "1.0.36", + "version": "1.0.37", "description": "CLI tool for extended productivity with AWS Serverless Application Model (SAM)", "main": "index.js", "scripts": { diff --git a/src/commands/local/lib/event-router.js b/src/commands/local/lib/event-router.js index 96bdfe3..25ab945 100644 --- a/src/commands/local/lib/event-router.js +++ b/src/commands/local/lib/event-router.js @@ -58,7 +58,7 @@ if (process.argv.length > 3) { const stack = JSON.parse(process.argv[3]); const functionSources = JSON.parse(process.argv[4]); routeEvent(obj, stack, functionSources).then((result) => { - if (!result.skipResponse) { + if (!result?.skipResponse) { const response = typeof result === "string" ? result : JSON.stringify(result, null, 2); process.send(response || ""); }