Skip to content

Commit 4aa2cda

Browse files
committed
fix: parse method mutating its input
Signed-off-by: Matej Vasek <[email protected]>
1 parent 5ab8164 commit 4aa2cda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/bindings/http/validation/structured.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function parse(payload, headers, receiver) {
2626
const sanityHeaders = sanityAndClone(headers);
2727
const contentType = sanityHeaders[HEADER_CONTENT_TYPE];
2828
const parser = receiver.parserByMime[contentType];
29-
const incoming = parser.parse(payload);
29+
const incoming = { ...parser.parse(payload) };
3030
const event = {
3131
type: undefined,
3232
source: undefined

0 commit comments

Comments
 (0)