diff --git a/lib/nodered/nodeRedBlocksCodeGen.js b/lib/nodered/nodeRedBlocksCodeGen.js index 564ae14..285ab9a 100644 --- a/lib/nodered/nodeRedBlocksCodeGen.js +++ b/lib/nodered/nodeRedBlocksCodeGen.js @@ -43,13 +43,13 @@ Blockly.JavaScript['node_object_get'] = function(block) { case "REMOVE": switch(value_object) { case 'context': - code = 'context.set(' + value_field_name + ');\n'; + code = 'context.set(' + value_field_name + ', undefined);\n'; break; case 'flow': - code = 'flow.set(' + value_field_name + ');\n'; + code = 'flow.set(' + value_field_name + ', undefined);\n'; break; case 'global': - code = 'global.set(' + value_field_name + ');\n'; + code = 'global.set(' + value_field_name + ', undefined);\n'; break; default: // normal object (i.e. no Node-RED specific memory) code = 'delete ' + value_object + splitNestedFields(value_field_name) + ';\n';