From 12a78c5745a15acc38f9a458d19e6f8b392ba7ce Mon Sep 17 00:00:00 2001 From: Shazeb Ata <32903329+ataata107@users.noreply.github.com> Date: Fri, 3 Jan 2020 02:16:50 +0530 Subject: [PATCH] Created a new object instead of passing by reference (#1379) * Creating copy of object * Creating copy of object * Create new object Co-authored-by: Harsh Khandeparkar <34770591+HarshKhandeparkar@users.noreply.github.com> Co-authored-by: Jeffrey Warren --- examples/lib/mapHtmltypes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/lib/mapHtmltypes.js b/examples/lib/mapHtmltypes.js index 16899f66..c7005d43 100644 --- a/examples/lib/mapHtmltypes.js +++ b/examples/lib/mapHtmltypes.js @@ -24,7 +24,7 @@ function mapHtmlTypes(inputInfo){ htmlType = 'text'; break; } - var response = inputInfo; + var response = Object.assign({}, inputInfo); response.type = htmlType; return response; }