mirror of
https://github.com/google/blockly.git
synced 2026-01-09 18:10:08 +01:00
Add warning to blockToCode (#4492)
* Add warning to blockToCode * Address PR comments
This commit is contained in:
@@ -113,6 +113,12 @@ Blockly.JavaScript.ORDER_OVERRIDES = [
|
||||
[Blockly.JavaScript.ORDER_LOGICAL_OR, Blockly.JavaScript.ORDER_LOGICAL_OR]
|
||||
];
|
||||
|
||||
/**
|
||||
* Whether the init method has been called.
|
||||
* @type {?boolean}
|
||||
*/
|
||||
Blockly.JavaScript.isInitialized = false;
|
||||
|
||||
/**
|
||||
* Initialise the database of variable names.
|
||||
* @param {!Blockly.Workspace} workspace Workspace to generate code from.
|
||||
@@ -153,6 +159,7 @@ Blockly.JavaScript.init = function(workspace) {
|
||||
Blockly.JavaScript.definitions_['variables'] =
|
||||
'var ' + defvars.join(', ') + ';';
|
||||
}
|
||||
this.isInitialized = true;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user