Skip to content

Commit

Permalink
Remove as undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
bartbutenaers authored Oct 26, 2023
1 parent cdf069b commit 434c01f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/nodered/nodeRedBlocksCodeGen.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 434c01f

Please sign in to comment.