fix: parse method mutating its input (#231)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
parent
5ab81641ae
commit
060b21ba36
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue