From 1c649303e347ae31c1b6ad720007f2fb288f2d42 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 23 Aug 2016 14:50:29 +0100 Subject: [PATCH] Consistency with sendResponse --- src/ScalarMessaging.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ScalarMessaging.js b/src/ScalarMessaging.js index 3f31cad19e..22b2b9a6d1 100644 --- a/src/ScalarMessaging.js +++ b/src/ScalarMessaging.js @@ -62,7 +62,7 @@ function sendResponse(event, res) { function sendError(event, msg, nestedError) { console.error("Action:" + event.data.action + " failed with message: " + msg); - const data = event.data; + const data = JSON.parse(JSON.stringify(event.data); data.response = { error: { message: msg,