8000 fix: parse method mutating its input (#231) · lholmquist/sdk-javascript@060b21b · GitHub
[go: up one dir, main page]

Skip to content

Commit 060b21b

Browse files
authored
fix: parse method mutating its input (cloudevents#231)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
1 parent 5ab8164 commit 060b21b

File tree

1 file chan 8000 ged

+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)
0