fix: parse method mutating its input (#231)

Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
Matej Vasek 2020-06-24 22:16:45 +02:00 committed by GitHub
parent 5ab81641ae
commit 060b21ba36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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