We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9877d59 commit de705bdCopy full SHA for de705bd
src/index.ts
@@ -55,10 +55,12 @@ const ShallotSocketWrapper = <TEvent extends TShallotSocketEvent = TShallotSocke
55
): ShallotAWSHandler<TEvent, APIGatewayProxyResult> => {
56
const wrappedResponseHandler: Handler = async (...args) => {
57
const res = await handler(...args);
58
- return {
59
- statusCode: successStatusCode,
60
- body: res == null ? undefined : JSON.stringify(res),
61
- };
+ if (res != null) {
+ return {
+ statusCode: successStatusCode,
+ body: JSON.stringify(res),
62
+ };
63
+ }
64
};
65
66
const wrapper = ShallotAWS(wrappedResponseHandler)
0 commit comments