fix(core): update

This commit is contained in:
Philipp Kunz 2019-08-22 12:38:55 +02:00
parent 6f5d10ccd3
commit 7a3e565dbb

View File

@ -14,11 +14,11 @@ const buildUtf8Response = (
const done = plugins.smartpromise.defer<IExtendedIncomingMessage>();
// Continuously update stream with data
let body = '';
incomingMessageArg.on('data', function(chunkArg) {
incomingMessageArg.on('data', (chunkArg) => {
body += chunkArg;
});
incomingMessageArg.on('end', function() {
incomingMessageArg.on('end', () => {
if (autoJsonParse) {
try {
(incomingMessageArg as IExtendedIncomingMessage).body = JSON.parse(body);