Clean up some text generator logic (#4342)

This commit is contained in:
Monica Kozbial
2020-09-30 15:18:40 -07:00
committed by GitHub
parent 81d355f5fa
commit ef6f3ebe8c
2 changed files with 2 additions and 6 deletions

View File

@@ -188,8 +188,6 @@ Blockly.JavaScript['text_getSubstring'] = function(block) {
var text = Blockly.JavaScript.valueToCode(block, 'STRING',
textOrder) || '\'\'';
if (where1 == 'FIRST' && where2 == 'LAST') {
var text = Blockly.JavaScript.valueToCode(block, 'STRING',
Blockly.JavaScript.ORDER_NONE) || '\'\'';
var code = text;
return [code, Blockly.JavaScript.ORDER_NONE];
} else if (text.match(/^'?\w+'?$/) || requiresLengthCall) {