Raise error if statement block returns tuple.

This commit is contained in:
Neil Fraser
2016-03-18 14:17:31 -07:00
parent 6ae436a153
commit a7892d1aee
4 changed files with 8 additions and 6 deletions

View File

@@ -93,7 +93,7 @@ Blockly.Lua['text_indexOf'] = function(block) {
Blockly.Lua.ORDER_NONE) || '\'\'';
var str = Blockly.Lua.valueToCode(block, 'VALUE',
Blockly.Lua.ORDER_NONE) || '\'\'';
if (block.getTitleValue('END') == 'FIRST') {
if (block.getFieldValue('END') == 'FIRST') {
var functionName = Blockly.Lua.provideFunction_(
'firstIndexOf',
['function ' + Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_ +