From 73340a06e5ce2acef67998ce67d6f116b3c7183e Mon Sep 17 00:00:00 2001 From: Gokula Krishna Date: Tue, 24 Jul 2018 09:54:37 +0800 Subject: [PATCH] Add backward compatibility support --- core/variables.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/variables.js b/core/variables.js index 5754be083..5c37864cc 100644 --- a/core/variables.js +++ b/core/variables.js @@ -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]; }