mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Add backward compatibility support
This commit is contained in:
@@ -106,8 +106,9 @@ Blockly.Variables.allDeveloperVariables = function(workspace) {
|
||||
var hash = {};
|
||||
for (var i = 0; i < blocks.length; i++) {
|
||||
var block = blocks[i];
|
||||
if (block.getDeveloperVariables) {
|
||||
var devVars = block.getDeveloperVariables();
|
||||
var getDeveloperVariables = block.getDeveloperVars || block.getDeveloperVariables;
|
||||
if (getDeveloperVariables) {
|
||||
var devVars = getDeveloperVariables();
|
||||
for (var j = 0; j < devVars.length; j++) {
|
||||
hash[devVars[j]] = devVars[j];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user