Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,8 @@ Handler.prototype.saveEvaluationContext = function (context, evaluationContext)
* @param value - desired value to be set
*/
Handler.prototype.setBuiltinContextProperty = function(context, path, value) {
const result = builtInContextUtils.setProperty(JSON.parse(JSON.stringify(context.builtin)), path, value);
const result = builtInContextUtils.setProperty(context.builtin, path, value);
if(result.valid) {
context.builtin = result.obj;
logger.info('Successfully set built-in context property ' + path);
return result
} else {
Expand All @@ -253,9 +252,8 @@ Handler.prototype.setBuiltinContextProperty = function(context, path, value) {
* @returns {{}}
*/
Handler.prototype.deleteBuiltinContextProperty = function(context, path) {
const result = builtInContextUtils.deleteProperty(JSON.parse(JSON.stringify(context.builtin)), path);
const result = builtInContextUtils.deleteProperty(context.builtin, path);
if(result.valid) {
context.builtin = result.obj;
logger.log('Successfully deleted built-in context property ' + path);
return result;
} else {
Expand Down