mirror of
https://github.com/google/blockly.git
synced 2026-01-04 23:50:12 +01:00
Collapse the five 0/1-based index flags into one option.
This commit is contained in:
@@ -96,7 +96,7 @@ Blockly.JavaScript['text_indexOf'] = function(block) {
|
||||
Blockly.JavaScript.ORDER_MEMBER) || '\'\'';
|
||||
var code = text + '.' + operator + '(' + substring + ')';
|
||||
// Adjust index if using one-based indices.
|
||||
if (Blockly.JavaScript.ONE_BASED_INDEXING) {
|
||||
if (block.workspace.options.oneBasedIndex) {
|
||||
return [code + ' + 1', Blockly.JavaScript.ORDER_ADDITION];
|
||||
}
|
||||
return [code, Blockly.JavaScript.ORDER_FUNCTION_CALL];
|
||||
|
||||
Reference in New Issue
Block a user