Skip to content

Commit

Permalink
fix: parse method mutating its input (cloudevents#231)
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Vasek <mvasek@redhat.com>
  • Loading branch information
matejvasek authored Jun 24, 2020
1 parent 5ab8164 commit 060b21b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/bindings/http/validation/structured.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function parse(payload, headers, receiver) {
const sanityHeaders = sanityAndClone(headers);
const contentType = sanityHeaders[HEADER_CONTENT_TYPE];
const parser = receiver.parserByMime[contentType];
const incoming = parser.parse(payload);
const incoming = { ...parser.parse(payload) };
const event = {
type: undefined,
source: undefined
Expand Down

0 comments on commit 060b21b

Please # to comment.