mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
chore: fix missing requires in generators (#5744)
* chore: fix some missing requires in generators * chore: fix missing requires in dart block generators * chore: replace Blockly.isNumber with Blockly.utils.string.isNumber in generators * chore: fix more missing requires in block generators
This commit is contained in:
@@ -13,8 +13,12 @@
|
||||
goog.provide('Blockly.Python');
|
||||
|
||||
goog.require('Blockly.Generator');
|
||||
goog.require('Blockly.Names');
|
||||
goog.require('Blockly.Variables');
|
||||
goog.require('Blockly.inputTypes');
|
||||
goog.require('Blockly.utils.string');
|
||||
goog.requireType('Blockly.Block');
|
||||
goog.requireType('Blockly.Workspace');
|
||||
|
||||
|
||||
/**
|
||||
@@ -305,7 +309,7 @@ Blockly.Python.getAdjustedInt = function(block, atId, opt_delta, opt_negate) {
|
||||
const atOrder = delta ? this.ORDER_ADDITIVE : this.ORDER_NONE;
|
||||
let at = this.valueToCode(block, atId, atOrder) || defaultAtIndex;
|
||||
|
||||
if (Blockly.isNumber(at)) {
|
||||
if (Blockly.utils.string.isNumber(at)) {
|
||||
// If the index is a naked number, adjust it right now.
|
||||
at = parseInt(at, 10) + delta;
|
||||
if (opt_negate) {
|
||||
|
||||
Reference in New Issue
Block a user