Skip to content

Commit

Permalink
fix: multiValueQueryStringParameters should be null if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
sternetj committed Nov 6, 2024
1 parent 9d123f2 commit 72066b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/adapters/helpers/lambdaEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ export const lambdaEvent = (config: AlphaOptions, relativeUrl?: string) => {
userArn: null,
},
},
multiValueQueryStringParameters,
multiValueQueryStringParameters:
Object.keys(multiValueQueryStringParameters).length > 0
? multiValueQueryStringParameters
: null,
};

if (Buffer.isBuffer(event.body)) {
Expand Down
2 changes: 1 addition & 1 deletion test/lambda-event.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ test('Can parse URLs without duplicates', () => {
pageSize: '25',
test: 'diffValue',
},
multiValueQueryStringParameters: {},
multiValueQueryStringParameters: null,
}));
assertRequestId(result);
});
Expand Down

0 comments on commit 72066b3

Please sign in to comment.