Skip to content

Commit b43cb6a

Browse files
committed
use return value conditionally
1 parent f376889 commit b43cb6a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ const ShallotSocketWrapper = <TEvent extends TShallotSocketEvent = TShallotSocke
5454
} = {}
5555
): ShallotAWSHandler<TEvent, APIGatewayProxyResult> => {
5656
const wrappedResponseHandler: Handler = async (...args) => {
57-
await handler(...args);
57+
const res = await handler(...args);
5858
return {
5959
statusCode: successStatusCode,
60+
body: res == null ? undefined : JSON.stringify(res),
6061
};
6162
};
6263

0 commit comments

Comments
 (0)