mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
@@ -136,7 +136,7 @@ Blockly.Dart['text_charAt'] = function(block) {
|
||||
code = functionName + '(' + text + ')';
|
||||
return [code, Blockly.Dart.ORDER_UNARY_POSTFIX];
|
||||
}
|
||||
throw 'Unhandled option (text_charAt).';
|
||||
throw Error('Unhandled option (text_charAt).');
|
||||
};
|
||||
|
||||
Blockly.Dart['text_getSubstring'] = function(block) {
|
||||
@@ -164,7 +164,7 @@ Blockly.Dart['text_getSubstring'] = function(block) {
|
||||
var at1 = '0';
|
||||
break;
|
||||
default:
|
||||
throw 'Unhandled option (text_getSubstring).';
|
||||
throw Error('Unhandled option (text_getSubstring).');
|
||||
}
|
||||
switch (where2) {
|
||||
case 'FROM_START':
|
||||
@@ -178,7 +178,7 @@ Blockly.Dart['text_getSubstring'] = function(block) {
|
||||
case 'LAST':
|
||||
break;
|
||||
default:
|
||||
throw 'Unhandled option (text_getSubstring).';
|
||||
throw Error('Unhandled option (text_getSubstring).');
|
||||
}
|
||||
if (where2 == 'LAST') {
|
||||
var code = text + '.substring(' + at1 + ')';
|
||||
|
||||
Reference in New Issue
Block a user