Commit ecd1981e authored by 皮皮蟹's avatar 皮皮蟹 Committed by Evan W. Patton

Add default statement for empty variable block (#1391)

Fixes #1390
parent da5227b4
...@@ -141,7 +141,8 @@ Blockly.Yail['local_variable'] = function(block,isExpression) { ...@@ -141,7 +141,8 @@ Blockly.Yail['local_variable'] = function(block,isExpression) {
code += Blockly.Yail.YAIL_SPACER + Blockly.Yail.valueToCode(block, 'RETURN', Blockly.Yail.ORDER_NONE); code += Blockly.Yail.YAIL_SPACER + Blockly.Yail.valueToCode(block, 'RETURN', Blockly.Yail.ORDER_NONE);
} }
} else { } else {
code += Blockly.Yail.YAIL_SPACER + Blockly.Yail.statementToCode(block, 'STACK', Blockly.Yail.ORDER_NONE); code += Blockly.Yail.YAIL_SPACER +
(Blockly.Yail.statementToCode(block, 'STACK', Blockly.Yail.ORDER_NONE) || Blockly.Yail.YAIL_FALSE);
} }
code += Blockly.Yail.YAIL_SPACER + Blockly.Yail.YAIL_CLOSE_COMBINATION; code += Blockly.Yail.YAIL_SPACER + Blockly.Yail.YAIL_CLOSE_COMBINATION;
if(!isExpression){ if(!isExpression){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment