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 <jeff@unterbahn.com>
This commit is contained in:
Shazeb Ata
2020-01-03 02:16:50 +05:30
committed by Jeffrey Warren
parent 6ffba532c3
commit 12a78c5745

View File

@@ -24,7 +24,7 @@ function mapHtmlTypes(inputInfo){
htmlType = 'text';
break;
}
var response = inputInfo;
var response = Object.assign({}, inputInfo);
response.type = htmlType;
return response;
}